summaryrefslogtreecommitdiff
path: root/source4/rpc_server/epmapper/rpc_epmapper.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-25 11:24:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:13 -0500
commitd79c7d41da373dea7f95506c178b18f0dd896043 (patch)
treecc8063224f109163481973e5f076674c976d7b9f /source4/rpc_server/epmapper/rpc_epmapper.c
parent998e8022b6d608840cf7c8058e24277b959da64d (diff)
downloadsamba-d79c7d41da373dea7f95506c178b18f0dd896043.tar.gz
samba-d79c7d41da373dea7f95506c178b18f0dd896043.tar.bz2
samba-d79c7d41da373dea7f95506c178b18f0dd896043.zip
r2627: use the new talloc capabilities in a bunch more places in the rpc
server code. This fixes a number of memory leaks I found when testing with valgrind and smbtorture, as the cascading effect of a talloc_free() ensures that anything derived from the top level object is destroyed on disconnect. (This used to be commit 76d0b8206ce64d6ff4a192979c43dddbec726d6e)
Diffstat (limited to 'source4/rpc_server/epmapper/rpc_epmapper.c')
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 62c545cd94..4450f5b0a2 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -183,13 +183,13 @@ static error_status_t epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX
if (!eps) {
/* this is the first call - fill the list. Subsequent calls
will feed from this list, stored in the handle */
- eps = talloc_p(h->mem_ctx, struct rpc_eps);
+ eps = talloc_p(h, struct rpc_eps);
if (!eps) {
return EPMAPPER_STATUS_NO_MEMORY;
}
h->data = eps;
- eps->count = build_ep_list(h->mem_ctx, dce_call->conn->dce_ctx->endpoint_list, &eps->e);
+ eps->count = build_ep_list(h, dce_call->conn->dce_ctx->endpoint_list, &eps->e);
}
/* return the next N elements */