The branch, master has been updated
       via  66412bf... s3:rpc_server: fix memory leaks in 
rpc_pipe_internal_dispatch()
      from  9e88b57... s3: Fix typos

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 66412bfc76dc8b7337f3690ec75b14542a3df11e
Author: Stefan Metzmacher <me...@samba.org>
Date:   Sat Aug 7 14:27:27 2010 +0200

    s3:rpc_server: fix memory leaks in rpc_pipe_internal_dispatch()
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/rpc_ncacn_np_internal.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c 
b/source3/rpc_server/rpc_ncacn_np_internal.c
index b2b337a..b540884 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;
 }


-- 
Samba Shared Repository

Reply via email to