summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-08-07 14:27:27 +0200
committerStefan Metzmacher <metze@samba.org>2010-08-08 09:24:44 +0200
commit66412bfc76dc8b7337f3690ec75b14542a3df11e (patch)
treee67e8d492071d45f510602d5a6f60e193034919e
parent9e88b57407fc9d201277a70226a6be3fb713ae39 (diff)
downloadsamba-66412bfc76dc8b7337f3690ec75b14542a3df11e.tar.gz
samba-66412bfc76dc8b7337f3690ec75b14542a3df11e.tar.bz2
samba-66412bfc76dc8b7337f3690ec75b14542a3df11e.zip
s3:rpc_server: fix memory leaks in rpc_pipe_internal_dispatch()
metze
-rw-r--r--source3/rpc_server/rpc_ncacn_np_internal.c7
1 files changed, 7 insertions, 0 deletions
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;
}