From 66412bfc76dc8b7337f3690ec75b14542a3df11e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 7 Aug 2010 14:27:27 +0200 Subject: s3:rpc_server: fix memory leaks in rpc_pipe_internal_dispatch() metze --- source3/rpc_server/rpc_ncacn_np_internal.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3') diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c b/source3/rpc_server/rpc_ncacn_np_internal.c index b2b337af5b..b5408841a1 100644 --- a/source3/rpc_server/rpc_ncacn_np_internal.c +++ b/source3/rpc_server/rpc_ncacn_np_internal.c @@ -293,16 +293,23 @@ static NTSTATUS rpc_pipe_internal_dispatch(struct rpc_pipe_client *cli, } if (!cmds[i].fn(cli->pipes_struct)) { + data_blob_free(&cli->pipes_struct->in_data.data); + data_blob_free(&cli->pipes_struct->out_data.rdata); + talloc_free_children(cli->pipes_struct->mem_ctx); return NT_STATUS_UNSUCCESSFUL; } status = internal_ndr_pull(mem_ctx, cli, table, opnum, r); if (!NT_STATUS_IS_OK(status)) { + data_blob_free(&cli->pipes_struct->in_data.data); + data_blob_free(&cli->pipes_struct->out_data.rdata); + talloc_free_children(cli->pipes_struct->mem_ctx); return status; } data_blob_free(&cli->pipes_struct->in_data.data); data_blob_free(&cli->pipes_struct->out_data.rdata); + talloc_free_children(cli->pipes_struct->mem_ctx); return NT_STATUS_OK; } -- cgit