]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:modules: Fix the horrible vfs_crossrename module
authorPavel Filipenský <pfilipen@redhat.com>
Fri, 7 Jan 2022 12:16:26 +0000 (13:16 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 10 Jan 2022 23:31:33 +0000 (23:31 +0000)
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 <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_crossrename.c

index 52b8af9d3f61a1997bbe0b15d89cab5eca44b3e3..930eec02739cf57e00cfbd74ebf5b0cd32b267f3 100644 (file)
@@ -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;
        }