]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix CID 1452290 Null pointer dereferences (REVERSE_INULL)
authorVolker Lendecke <vl@samba.org>
Wed, 14 Aug 2019 06:37:00 +0000 (08:37 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 14 Aug 2019 07:39:38 +0000 (07:39 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dir.c

index 521cb60324ed4dd813c50c58f206de9174d0aaf6..f60812fd8c9fe3c6e3cb4a1c6b22b138fa89369a 100644 (file)
@@ -333,11 +333,12 @@ done:
 
 void dptr_CloseDir(files_struct *fsp)
 {
-       struct smbd_server_connection *sconn = fsp->dptr->conn->sconn;
+       struct smbd_server_connection *sconn = NULL;
 
        if (fsp->dptr == NULL) {
                return;
        }
+       sconn = fsp->dptr->conn->sconn;
 
        /*
         * The destructor for the struct smb_Dir (fsp->dptr->dir_hnd)