smbXsrv_tcon: explicitly set tcon->db_rec = NULL after tcon->db_rec = local_rec
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Sep 2020 09:24:46 +0000 (11:24 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 6 Mar 2021 02:20:05 +0000 (02:20 +0000)
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 <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smbXsrv_tcon.c

index d6c2bca0abca19f6f426e33b3f35f230d8388eab..938eb7ab1626ea162c8d3df29b0eb176daf0d3d1 100644 (file)
@@ -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;