]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Fix Coverity ID 709049 Dereference before null check
authorVolker Lendecke <vl@samba.org>
Mon, 11 Jun 2012 08:35:38 +0000 (10:35 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 11 Jun 2012 13:30:54 +0000 (15:30 +0200)
We have dereferenced fsp before. Because smb2 is only handle based,
this is a bogus check.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 11 15:30:54 CEST 2012 on sn-devel-104

source3/smbd/smb2_getinfo.c

index 1e0f24cf757ae7a0513b815ba93c48d792892422..076cc55f1a85aa5c286065010d3a65021ca3c242 100644 (file)
@@ -316,7 +316,7 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
 
                        /* We know this name is ok, it's already passed the checks. */
 
-               } else if (fsp && fsp->fh->fd == -1) {
+               } else if (fsp->fh->fd == -1) {
                        /*
                         * This is actually a QFILEINFO on a directory
                         * handle (returned from an NT SMB). NT5.0 seems