]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: avoid a panic in close_directory()
authorRalph Boehme <slow@samba.org>
Mon, 18 Nov 2024 09:50:13 +0000 (10:50 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 18 Nov 2024 12:43:28 +0000 (12:43 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15754

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Nov 18 12:43:28 UTC 2024 on atb-devel-224

source3/smbd/close.c

index 53e2aae1bf3ba6e731d7a941f1bd1b45dd56a653..16356a07cc31c792b51b467804ac19ebe3257f6e 100644 (file)
@@ -1528,7 +1528,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
        if (!NT_STATUS_IS_OK(status)) {
                DBG_ERR("share_mode_entry_prepare_lock_del() failed for %s - %s\n",
                        fsp_str_dbg(fsp), nt_errstr(status));
-               return status;
+               log_stack_trace();
+               goto close_fd;
        }
 
        /* Remove the oplock before potentially deleting the file. */
@@ -1640,6 +1641,7 @@ done:
                             lease);
        }
 
+close_fd:
        status1 = fd_close(fsp);
 
        if (!NT_STATUS_IS_OK(status1)) {