]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: initialize delete_on_close in smbd_smb2_setinfo_lease_break_fsp_check()
authorRalph Boehme <slow@samba.org>
Thu, 7 Nov 2024 13:11:48 +0000 (14:11 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 7 Nov 2024 17:21:53 +0000 (17:21 +0000)
CID 1634488:  Uninitialized variables  (UNINIT)

/source3/smbd/smb2_setinfo.c: 475 in smbd_smb2_setinfo_lease_break_fsp_check()
469      &delete_on_close);
470      if (tevent_req_nterror(req, status)) {
471      return;
472      }
473      }
474
>>>     CID 1634488:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "delete_on_close".
475      if (!rename && !delete_on_close) {
476      return;
477      }
478
479      state->lck = get_existing_share_mode_lock(state, fsp->file_id);
480      if (state->lck == NULL) {

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov  7 17:21:53 UTC 2024 on atb-devel-224

source3/smbd/smb2_setinfo.c

index 84c651b1794a449ed6cc29ed859e8fc1e0ea1311..91280a52c07748106e55279499429f58a4a268da 100644 (file)
@@ -456,7 +456,7 @@ static void smbd_smb2_setinfo_lease_break_fsp_check(struct tevent_req *req)
        struct tevent_req *subreq = NULL;
        struct timeval timeout;
        bool rename;
-       bool delete_on_close;
+       bool delete_on_close = false;
        NTSTATUS status;
 
        rename = (file_info_level == SMB2_FILE_RENAME_INFORMATION_INTERNAL);