summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-24 07:08:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:10 -0500
commit7358fb62b8dcfb6714839c35230bbfeb35d83e08 (patch)
treee1d147e427b6e9b7e1c9ff06ebf24254105d8771 /source4
parent8e5acb6df0396e65712840f668b34ff4531ff126 (diff)
downloadsamba-7358fb62b8dcfb6714839c35230bbfeb35d83e08.tar.gz
samba-7358fb62b8dcfb6714839c35230bbfeb35d83e08.tar.bz2
samba-7358fb62b8dcfb6714839c35230bbfeb35d83e08.zip
r2590: fixed one of the server security memory leaks. There are more :(
(This used to be commit 9e1eb58e4b332e4a300e8b546a5d39bd2f7cd7a6)
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/sesssetup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index f9b2eee1b2..aeae404d6a 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -271,6 +271,10 @@ static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup
}
} else {
status = nt_status_squash(status);
+ if (smb_sess->gensec_ctx &&
+ !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+ gensec_end(&smb_sess->gensec_ctx);
+ }
}
sess->spnego.out.action = 0;