From: Andreas Schneider Date: Thu, 10 Jun 2021 07:14:22 +0000 (+0200) Subject: s3:smbd: Remove unnessesary NULL check for req X-Git-Tag: tevent-0.11.0~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eef0f73620912a6a299a2558bd76e9454141c6cd;p=thirdparty%2Fsamba.git s3:smbd: Remove unnessesary NULL check for req We already dereference req earlier. So if it is NULL it already segfaulted much earlier. Found by covscan. Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský Reviewed-by: Noel Power Autobuild-User(master): Noel Power Autobuild-Date(master): Thu Jun 10 11:22:19 UTC 2021 on sn-devel-184 --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index d453eb5e6f4..abec7857951 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3572,7 +3572,7 @@ void reply_unlink(struct smb_request *req) goto out; } - if (req != NULL && !req->posix_pathnames) { + if (!req->posix_pathnames) { char *lcomp = get_original_lcomp(ctx, conn, name,