From 18331d653b91cdcebc6dc34438afdad2084790c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Filipensk=C3=BD?= Date: Fri, 7 Jan 2022 13:16:26 +0100 Subject: [PATCH] s3:modules: Fix the horrible vfs_crossrename module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It really has to be removed! ;-) Found by covscan. The code always leaves here as the dst variable BUG: https://bugzilla.samba.org/show_bug.cgi?id=14940 Pair-programmed-with: Andreas Schneider Signed-off-by: Pavel Filipenský Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison (cherry picked from commit 4d7ed39fd8fa18f90756f215c8b0fc5d293e955e) --- source3/modules/vfs_crossrename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c index 52b8af9d3f6..930eec02739 100644 --- a/source3/modules/vfs_crossrename.c +++ b/source3/modules/vfs_crossrename.c @@ -82,7 +82,7 @@ static NTSTATUS copy_reg(vfs_handle_struct *handle, full_fname_src = full_path_from_dirfsp_atname(talloc_tos(), srcfsp, source); - if (full_fname_dst == NULL) { + if (full_fname_src == NULL) { status = NT_STATUS_NO_MEMORY; goto out; } -- 2.30.2