From: Stefan Metzmacher Date: Wed, 23 Sep 2020 09:24:46 +0000 (+0200) Subject: smbXsrv_tcon: explicitly set tcon->db_rec = NULL after tcon->db_rec = local_rec X-Git-Tag: tevent-0.11.0~1671 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=253a4de82bd4e44586572b71e06762c3f6dbd795;p=thirdparty%2Fsamba.git smbXsrv_tcon: explicitly set tcon->db_rec = NULL after tcon->db_rec = local_rec There's no know problem that we fix for the smbXsrv_tcon_disconnect_all_callback() case, but it might prevent future problems. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14532 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smbXsrv_tcon.c b/source3/smbd/smbXsrv_tcon.c index d6c2bca0abc..938eb7ab162 100644 --- a/source3/smbd/smbXsrv_tcon.c +++ b/source3/smbd/smbXsrv_tcon.c @@ -1061,6 +1061,7 @@ static int smbXsrv_tcon_disconnect_all_callback(struct db_record *local_rec, tcon->db_rec = local_rec; status = smbXsrv_tcon_disconnect(tcon, vuid); + tcon->db_rec = NULL; if (!NT_STATUS_IS_OK(status)) { if (NT_STATUS_IS_OK(state->first_status)) { state->first_status = status;