From a14b88ddd48962cc561e9d96af99ca087568389d Mon Sep 17 00:00:00 2001 From: Shachar Sharon Date: Thu, 16 Apr 2026 12:04:25 +0300 Subject: [PATCH] smbd: handle synthetic_smb_fname failure properly in delete_all_streams When 'synthetic_smb_fname' fails due to memory error, it returns NULL. Fix this error-case logic in 'delete_all_streams'. Signed-off-by: Shachar Sharon Reviewed-by: Anoop C S Reviewed-by: Ralph Boehme Autobuild-User(master): Anoop C S Autobuild-Date(master): Thu Apr 16 13:48:23 UTC 2026 on atb-devel-224 --- source3/smbd/close.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 3ce7403c52d..8eb3bd47aeb 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -201,7 +201,7 @@ NTSTATUS delete_all_streams(struct files_struct *fsp, NULL, smb_fname->twrp, (smb_fname->flags & ~SMB_FILENAME_POSIX_PATH)); - if (!NT_STATUS_IS_OK(status)) { + if (smb_fname_stream == NULL) { DEBUG(0, ("talloc_aprintf failed\n")); status = NT_STATUS_NO_MEMORY; goto fail; -- 2.47.3