]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Covscan: remove dead code
authorPavel Filipenský <pfilipen@redhat.com>
Wed, 11 May 2022 12:20:34 +0000 (14:20 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 14 May 2022 04:41:57 +0000 (04:41 +0000)
Covscan:
source3/smbd/files.c:575: check_after_deref: Null-checking "fsp" suggests that it
may be null, but it has already been dereferenced on all paths leading to the check.

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat May 14 04:41:57 UTC 2022 on sn-devel-184

source3/smbd/files.c

index 894b90bbd15afc71e4e4631b2061589497f41ce5..7a41cff565444cf611924aefd6bab67a8cc51e4d 100644 (file)
@@ -598,9 +598,6 @@ fail:
                  smb_fname_str_dbg(smb_fname),
                  nt_errstr(status));
 
-       if (fsp == NULL) {
-               return status;
-       }
        if (fsp_is_alternate_stream(fsp)) {
                struct files_struct *tmp_base_fsp = fsp->base_fsp;