diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-20 09:44:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:40 -0500 |
commit | d3e28ccd4824adce2feed9fe53cf2d4d393d607a (patch) | |
tree | a9f30272024ab4fac088d3620239478c8aa83a37 /source4/smb_server/smb2 | |
parent | b691b4ad3d5b2ac813355d81d4c90f84977689a3 (diff) | |
download | samba-d3e28ccd4824adce2feed9fe53cf2d4d393d607a.tar.gz samba-d3e28ccd4824adce2feed9fe53cf2d4d393d607a.tar.bz2 samba-d3e28ccd4824adce2feed9fe53cf2d4d393d607a.zip |
r23020: a better fix for the memory leak - this one doesn't stuff up spnego :)
(This used to be commit 9a8da730a725fc9fc1a3e407273e688f44eadfe1)
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/sesssetup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c index c99b443a35..3439f2f068 100644 --- a/source4/smb_server/smb2/sesssetup.c +++ b/source4/smb_server/smb2/sesssetup.c @@ -95,6 +95,10 @@ done: failed: req->status = auth_nt_status_squash(status); smb2srv_sesssetup_send(req, io); + if (!NT_STATUS_IS_OK(status) && ! + NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + talloc_free(smb_sess); + } } static void smb2srv_sesssetup_backend(struct smb2srv_request *req, union smb_sesssetup *io) @@ -138,7 +142,7 @@ static void smb2srv_sesssetup_backend(struct smb2srv_request *req, union smb_ses } /* allocate a new session */ - smb_sess = smbsrv_session_new(req->smb_conn, gensec_ctx); + smb_sess = smbsrv_session_new(req->smb_conn, req->smb_conn, gensec_ctx); if (!smb_sess) { status = NT_STATUS_INSUFFICIENT_RESOURCES; goto failed; |