diff options
author | Andreas Schneider <asn@samba.org> | 2011-07-26 12:07:20 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-08-09 10:41:47 +0200 |
commit | bc3fae70a27ced752844513996f29d0116a20079 (patch) | |
tree | 00e40e802d5ce595d6821c1622aa73cdbfeeea48 | |
parent | 020032e114c0e966acf24f24e707942219d60cf3 (diff) | |
download | samba-bc3fae70a27ced752844513996f29d0116a20079.tar.gz samba-bc3fae70a27ced752844513996f29d0116a20079.tar.bz2 samba-bc3fae70a27ced752844513996f29d0116a20079.zip |
s3-rpc_server: Free the children of p->mem_ctx.
Free the children of p->mem_ctx after processing a complete incoming and
outgoing request.
Signed-off-by: Simo Sorce <idra@samba.org>
-rw-r--r-- | source3/rpc_server/rpc_server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index b03715c024..c66d74771a 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -320,7 +320,7 @@ static void named_pipe_accept_function(struct tevent_context *ev_ctx, struct tevent_req *subreq; int ret; - npc = talloc_zero(NULL, struct named_pipe_client); + npc = talloc_zero(ev_ctx, struct named_pipe_client); if (!npc) { DEBUG(0, ("Out of memory!\n")); close(fd); @@ -589,6 +589,8 @@ static void named_pipe_packet_done(struct tevent_req *subreq) data_blob_free(&npc->p->out_data.frag); data_blob_free(&npc->p->out_data.rdata); + talloc_free_children(npc->p->mem_ctx); + /* Wait for the next packet */ subreq = dcerpc_read_ncacn_packet_send(npc, npc->ev, npc->tstream); if (!subreq) { @@ -1287,6 +1289,8 @@ static void dcerpc_ncacn_packet_done(struct tevent_req *subreq) data_blob_free(&ncacn_conn->p->out_data.frag); data_blob_free(&ncacn_conn->p->out_data.rdata); + talloc_free_children(ncacn_conn->p->mem_ctx); + /* Wait for the next packet */ subreq = dcerpc_read_ncacn_packet_send(ncacn_conn, ncacn_conn->ev_ctx, |