summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2008-08-23 13:12:36 +0200
committerVolker Lendecke <vl@samba.org>2008-08-23 13:19:35 +0200
commitc33e648fa5275c596d8047da8219531171245959 (patch)
tree3aa779d4ba09f65847eb4d54a13e54daf5e7effb
parent03dfaf37fd34a696dd6c586ec10b3134c5af0341 (diff)
downloadsamba-c33e648fa5275c596d8047da8219531171245959.tar.gz
samba-c33e648fa5275c596d8047da8219531171245959.tar.bz2
samba-c33e648fa5275c596d8047da8219531171245959.zip
Use talloc_stackframe() in machine_password_change_handler
(This used to be commit 79103000b13c95325534db749a0da638a3eb1807)
-rw-r--r--source3/winbindd/winbindd_dual.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 4d879c6fc4..d958ed0110 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -894,7 +894,7 @@ static void machine_password_change_handler(struct event_context *ctx,
struct winbindd_child *child =
(struct winbindd_child *)private_data;
struct rpc_pipe_client *netlogon_pipe = NULL;
- TALLOC_CTX *mem_ctx = NULL;
+ TALLOC_CTX *frame;
NTSTATUS result;
struct timeval next_change;
@@ -914,24 +914,20 @@ static void machine_password_change_handler(struct event_context *ctx,
return;
}
- mem_ctx = talloc_init("machine_password_change_handler ");
- if (!mem_ctx) {
- return;
- }
-
result = cm_connect_netlogon(child->domain, &netlogon_pipe);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("machine_password_change_handler: "
"failed to connect netlogon pipe: %s\n",
nt_errstr(result)));
- TALLOC_FREE(mem_ctx);
return;
}
+ frame = talloc_stackframe();
+
result = trust_pw_find_change_and_store_it(netlogon_pipe,
- mem_ctx,
+ frame,
child->domain->name);
- TALLOC_FREE(mem_ctx);
+ TALLOC_FREE(frame);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("machine_password_change_handler: "