summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-08-11 18:09:05 +0200
committerStefan Metzmacher <metze@samba.org>2009-08-12 13:27:59 +0200
commitfedac72dfc4c220f653dd243de221dad56650bac (patch)
tree7326562970e818a1b8c9a4b5310df77acb3c6799
parentd30b1c9fa9d03246124dc7db8bb583c260adb0d1 (diff)
downloadsamba-fedac72dfc4c220f653dd243de221dad56650bac.tar.gz
samba-fedac72dfc4c220f653dd243de221dad56650bac.tar.bz2
samba-fedac72dfc4c220f653dd243de221dad56650bac.zip
s3:smbd: make sure we don't call conn_free() with a NULL pointer for SMB2
metze
-rw-r--r--source3/smbd/smb2_tcon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 5137f5c270..4ed3fb5686 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -127,7 +127,9 @@ static int smbd_smb2_tcon_destructor(struct smbd_smb2_tcon *tcon)
idr_remove(tcon->session->tcons.idtree, tcon->tid);
DLIST_REMOVE(tcon->session->tcons.list, tcon);
- conn_free(tcon->compat_conn);
+ if (tcon->compat_conn) {
+ conn_free(tcon->compat_conn);
+ }
tcon->compat_conn = NULL;
tcon->tid = 0;