]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Remove unnessesary NULL check for req
authorAndreas Schneider <asn@samba.org>
Thu, 10 Jun 2021 07:14:22 +0000 (09:14 +0200)
committerNoel Power <npower@samba.org>
Thu, 10 Jun 2021 11:22:18 +0000 (11:22 +0000)
We already dereference req earlier. So if it is NULL it already
segfaulted much earlier.

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Jun 10 11:22:19 UTC 2021 on sn-devel-184

source3/smbd/reply.c

index d453eb5e6f4bd4e8f34cd36fead282fdde7bd13f..abec78579515c6d4818e3dae187069feef9a3119 100644 (file)
@@ -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,