The branch, v3-3-test has been updated
       via  1b7e108cc50a35fa1c15cf4a46f970306efdd1a3 (commit)
      from  e2cd00813c5221a03508249e5bb49e648befc734 (commit)

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


- Log -----------------------------------------------------------------
commit 1b7e108cc50a35fa1c15cf4a46f970306efdd1a3
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Mar 28 19:58:45 2009 +0100

    Fix smbd crash for close_on_completion
    
    handle_trans() can talloc_free "conn" if the client requests
    close_on_completion. "state" is a talloc_child of conn, so it will be gone 
when
    we later free state->data et al.

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

Summary of changes:
 source/smbd/ipc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index ac5950e..5c9f9f6 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -661,6 +661,8 @@ void reply_trans(struct smb_request *req)
                return;
        }
 
+       talloc_steal(talloc_tos(), state);
+
        handle_trans(conn, req, state);
 
        SAFE_FREE(state->data);
@@ -790,6 +792,8 @@ void reply_transs(struct smb_request *req)
          */
         SCVAL(req->inbuf,smb_com,SMBtrans);
 
+       talloc_steal(talloc_tos(), state);
+
        handle_trans(conn, req, state);
 
        DLIST_REMOVE(conn->pending_trans, state);


-- 
Samba Shared Repository

Reply via email to