From: Stefan Metzmacher Date: Tue, 11 Aug 2009 16:09:05 +0000 (+0200) Subject: s3:smbd: make sure we don't call conn_free() with a NULL pointer for SMB2 X-Git-Tag: talloc-2.0.0~406 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fedac72dfc4c220f653dd243de221dad56650bac;p=thirdparty%2Fsamba.git s3:smbd: make sure we don't call conn_free() with a NULL pointer for SMB2 metze --- diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index 5137f5c270b..4ed3fb56860 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;