The branch, master has been updated
       via  f6d08849e11775eb2530f04ecb055269ea445539 (commit)
       via  aef749b53fb835226d4e879234b3ac3da1e33557 (commit)
      from  40b67c3426042ea46d2497e459807ef9551e62f1 (commit)

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


- Log -----------------------------------------------------------------
commit f6d08849e11775eb2530f04ecb055269ea445539
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Jan 30 21:25:50 2009 +0100

    Fix memleaks

commit aef749b53fb835226d4e879234b3ac3da1e33557
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Jan 30 21:25:37 2009 +0100

    pass NULL to prs_give_memory, that is a pointer

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

Summary of changes:
 source3/rpc_client/cli_pipe.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 83247df..a741dec 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1252,7 +1252,7 @@ static struct async_req *rpc_api_pipe_send(TALLOC_CTX 
*mem_ctx,
 
        prs_init_empty(&state->incoming_pdu, state, UNMARSHALL);
        /* Make incoming_pdu dynamic with no memory. */
-       prs_give_memory(&state->incoming_pdu, 0, 0, true);
+       prs_give_memory(&state->incoming_pdu, NULL, 0, true);
 
        talloc_set_destructor(state, rpc_api_pipe_state_destructor);
 
@@ -2604,6 +2604,7 @@ static void rpc_pipe_bind_step_one_done(struct async_req 
*subreq)
        /* Unmarshall the RPC header */
        if (!smb_io_rpc_hdr("hdr", &hdr, &reply_pdu, 0)) {
                DEBUG(0, ("rpc_pipe_bind: failed to unmarshall RPC_HDR.\n"));
+               prs_mem_free(&reply_pdu);
                async_req_error(req, NT_STATUS_BUFFER_TOO_SMALL);
                return;
        }
@@ -2611,12 +2612,14 @@ static void rpc_pipe_bind_step_one_done(struct 
async_req *subreq)
        if (!smb_io_rpc_hdr_ba("", &hdr_ba, &reply_pdu, 0)) {
                DEBUG(0, ("rpc_pipe_bind: Failed to unmarshall "
                          "RPC_HDR_BA.\n"));
+               prs_mem_free(&reply_pdu);
                async_req_error(req, NT_STATUS_BUFFER_TOO_SMALL);
                return;
        }
 
        if (!check_bind_response(&hdr_ba, &state->cli->transfer_syntax)) {
                DEBUG(2, ("rpc_pipe_bind: check_bind_response failed.\n"));
+               prs_mem_free(&reply_pdu);
                async_req_error(req, NT_STATUS_BUFFER_TOO_SMALL);
                return;
        }
@@ -2633,6 +2636,7 @@ static void rpc_pipe_bind_step_one_done(struct async_req 
*subreq)
        case PIPE_AUTH_TYPE_NONE:
        case PIPE_AUTH_TYPE_SCHANNEL:
                /* Bind complete. */
+               prs_mem_free(&reply_pdu);
                async_req_done(req);
                break;
 
@@ -2640,6 +2644,7 @@ static void rpc_pipe_bind_step_one_done(struct async_req 
*subreq)
                /* Need to send AUTH3 packet - no reply. */
                status = rpc_finish_auth3_bind_send(req, state, &hdr,
                                                    &reply_pdu);
+               prs_mem_free(&reply_pdu);
                if (!NT_STATUS_IS_OK(status)) {
                        async_req_error(req, status);
                }
@@ -2649,6 +2654,7 @@ static void rpc_pipe_bind_step_one_done(struct async_req 
*subreq)
                /* Need to send alter context request and reply. */
                status = rpc_finish_spnego_ntlmssp_bind_send(req, state, &hdr,
                                                             &reply_pdu);
+               prs_mem_free(&reply_pdu);
                if (!NT_STATUS_IS_OK(status)) {
                        async_req_error(req, status);
                }
@@ -2660,6 +2666,7 @@ static void rpc_pipe_bind_step_one_done(struct async_req 
*subreq)
        default:
                DEBUG(0,("cli_finish_bind_auth: unknown auth type %u\n",
                         (unsigned int)state->cli->auth->auth_type));
+               prs_mem_free(&reply_pdu);
                async_req_error(req, NT_STATUS_INTERNAL_ERROR);
        }
 }


-- 
Samba Shared Repository

Reply via email to