summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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;