r8627: fixed a big memory leak in the spnego gensec code in session
authorAndrew Tridgell <tridge@samba.org>
Wed, 20 Jul 2005 04:19:45 +0000 (04:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:29:45 +0000 (13:29 -0500)
commit174da76293392782953242a996228e35708450e2
tree2d63550ee0fbdcd863653abbe39bf0655bdffc1c
parent594b76264fb77cb8d9bce5a36ca73afd14b62a1b
r8627: fixed a big memory leak in the spnego gensec code in session
setup. Andrew, please check over this.

What happens is this:

 - run the BASE-SECLEAK test
 - with each failed session setup using spnego a gensec ctx is leaked into the smb_conn structure
 - after the client disconnects these are finally cleaned up as they
   are all children of the connection structure
 - the cleanup of the millions of memory objects takes long enough
   that the next operation in test_posix.sh sometimes fails with a timeout

Andrew, can you also look at the talloc_reference() on line 332 of
sesssetup.c ? I suspect it isn't needed (I don't think it does any
actual harm though)
(This used to be commit b40fb6a4569ccc1fa1750a1e534e18a020764b4c)
source4/smb_server/sesssetup.c