]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove a pointless NULL check
authorVolker Lendecke <vl@samba.org>
Mon, 13 Nov 2023 12:48:42 +0000 (13:48 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 15 Nov 2023 05:10:35 +0000 (05:10 +0000)
We've dereferenced smb_fname before, and talloc_move() never fails.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c

index f66ab0956f7125afd356a0d0ac50ca12f8528d7f..b0a0dbae27313ac64b962e3c9cb199b7b4178a7e 100644 (file)
@@ -795,9 +795,6 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                TALLOC_FREE(dname);
 
                *_smb_fname = talloc_move(ctx, &smb_fname);
-               if (*_smb_fname == NULL) {
-                       return false;
-               }
                *_fname = fname;
                *_mode = mode;