From 7653ae27023539f57c8e89d878d5836480fffbb6 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 7 Nov 2024 14:11:48 +0100 Subject: [PATCH] smbd: initialize delete_on_close in smbd_smb2_setinfo_lease_break_fsp_check() 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 Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Thu Nov 7 17:21:53 UTC 2024 on atb-devel-224 --- source3/smbd/smb2_setinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 84c651b1794..91280a52c07 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -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); -- 2.47.3