From fedac72dfc4c220f653dd243de221dad56650bac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Aug 2009 18:09:05 +0200 Subject: [PATCH] s3:smbd: make sure we don't call conn_free() with a NULL pointer for SMB2 metze --- source3/smbd/smb2_tcon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c index 5137f5c270b8..4ed3fb568607 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; -- 2.34.1