From: Ralph Boehme Date: Fri, 8 Jul 2022 15:08:05 +0000 (+0200) Subject: smbd: follow-up fix for "if close fails just log it, don't crash" X-Git-Tag: tevent-0.13.0~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ec93ac6f34fda745912be648148f79d2a2b0671;p=thirdparty%2Fsamba.git smbd: follow-up fix for "if close fails just log it, don't crash" Signed-off-by: Ralph Boehme Reviewed-by: Björn Baumbach Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Sat Jul 9 09:04:46 UTC 2022 on sn-devel-184 --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 45cc7ffd79f..b56130f4f04 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -424,7 +424,7 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) fsp_set_base_fsp(fsp, NULL); status = fd_close(tmp_base_fsp); - if (NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status)) { DBG_ERR("Closing fd for fsp [%s] failed: %s. " "Please check your filesystem!!!\n", fsp_str_dbg(fsp), nt_errstr(status)); @@ -433,7 +433,7 @@ static int smb_fname_fsp_destructor(struct smb_filename *smb_fname) } status = fd_close(fsp); - if (NT_STATUS_IS_OK(status)) { + if (!NT_STATUS_IS_OK(status)) { DBG_ERR("Closing fd for fsp [%s] failed: %s. " "Please check your filesystem!!!\n", fsp_str_dbg(fsp), nt_errstr(status));