summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-10-21 16:07:22 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-10-21 22:43:56 +1100
commita0a787ad78a72b1bb9e7f9f7f28d18a4023a666b (patch)
tree734b50f65d38ef6a2071ac62efee33aabc5ba256
parent398188fb9b0d81552d0eb3dba9fcf0695ea539ff (diff)
downloadsamba-a0a787ad78a72b1bb9e7f9f7f28d18a4023a666b.tar.gz
samba-a0a787ad78a72b1bb9e7f9f7f28d18a4023a666b.tar.bz2
samba-a0a787ad78a72b1bb9e7f9f7f28d18a4023a666b.zip
s4:rpc_server Ensure we talloc_free handles when we delete objects
If we don't talloc_free the handle, we leak the memory onto the long-term context. Andrew Bartlett
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 5b9aa91ded..f4ada2c7c7 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -2300,6 +2300,7 @@ static NTSTATUS dcesrv_samr_DeleteDomainGroup(struct dcesrv_call_state *dce_call
return NT_STATUS_UNSUCCESSFUL;
}
+ talloc_free(h);
ZERO_STRUCTP(r->out.group_handle);
return NT_STATUS_OK;
@@ -2676,6 +2677,7 @@ static NTSTATUS dcesrv_samr_DeleteDomAlias(struct dcesrv_call_state *dce_call, T
return NT_STATUS_UNSUCCESSFUL;
}
+ talloc_free(h);
ZERO_STRUCTP(r->out.alias_handle);
return NT_STATUS_OK;
@@ -2962,6 +2964,7 @@ static NTSTATUS dcesrv_samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLO
return NT_STATUS_UNSUCCESSFUL;
}
+ talloc_free(h);
ZERO_STRUCTP(r->out.user_handle);
return NT_STATUS_OK;