From: Volker Lendecke Date: Mon, 13 Nov 2023 12:48:42 +0000 (+0100) Subject: smbd: Remove a pointless NULL check X-Git-Tag: talloc-2.4.2~725 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b0cfcdbc3755709f928ac4bc010d130deb042fe;p=thirdparty%2Fsamba.git smbd: Remove a pointless NULL check We've dereferenced smb_fname before, and talloc_move() never fails. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index f66ab0956f7..b0a0dbae273 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -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;