[SCM] Samba Shared Repository - branch v3-5-test updated

Jeremy Allison jra at samba.org
Wed Jan 6 14:15:06 MST 2010


The branch, v3-5-test has been updated
       via  80b5f95... Second part of the fix for bug #7020 - smbd using 2G memory.
      from  b635398... Fix bug #7020 - smbd using 2G memory.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -----------------------------------------------------------------
commit 80b5f95b7d05955943c33968b4f0742581b00480
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jan 6 13:11:00 2010 -0800

    Second part of the fix for bug #7020 - smbd using 2G memory.
    
    There was a second leak in the processing of the out_data.frag
    prs_struct. It needs freeing once the current pdu has been returned
    asynchronously.
    
    Jeremy.
    (cherry picked from commit d5995eec7e5fd487b57b8805095ffbc74796411a)

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

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 5d5eb0e..83f27fe 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -903,6 +903,13 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_
   out:
 	(*is_data_outstanding) = prs_offset(&p->out_data.frag) > n;
 
+	if (p->out_data.current_pdu_sent == prs_offset(&p->out_data.frag)) {
+		/* We've returned everything in the out_data.frag
+		 * so we're done with this pdu. Free it and reset
+		 * current_pdu_sent. */
+		p->out_data.current_pdu_sent = 0;
+		prs_mem_free(&p->out_data.frag);
+	}
 	return data_returned;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list