diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-25 11:24:10 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2004-09-25 11:24:10 +0000 |
commit | 0666281964844859fd9e6b17b1f96be76591d72d (patch) | |
tree | 9e47927f3b899ed72289609f6ab22cd50955529e /source/rpc_server/epmapper | |
parent | 61eab4d415b1653e0651e587c8c0819bbe8c94b8 (diff) | |
download | samba-0666281964844859fd9e6b17b1f96be76591d72d.tar.gz samba-0666281964844859fd9e6b17b1f96be76591d72d.tar.xz samba-0666281964844859fd9e6b17b1f96be76591d72d.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.
Diffstat (limited to 'source/rpc_server/epmapper')
-rw-r--r-- | source/rpc_server/epmapper/rpc_epmapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/rpc_server/epmapper/rpc_epmapper.c b/source/rpc_server/epmapper/rpc_epmapper.c index 62c545cd941..4450f5b0a21 100644 --- a/source/rpc_server/epmapper/rpc_epmapper.c +++ b/source/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 */ |