Fix coverity #676. Forward NULL.
authorJeremy Allison <jra@samba.org>
Fri, 19 Jun 2009 21:55:00 +0000 (14:55 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 19 Jun 2009 21:55:00 +0000 (14:55 -0700)
Jeremy.

source3/smbd/open.c

index d6331ee487a760245e64558359b426c5279ee334..72370c8c7c7d96654d45664306e7ae2e613d6785 100644 (file)
@@ -1463,6 +1463,12 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                DEBUG(10, ("open_file_ntcreate: printer open fname=%s\n",
                           smb_fname_str_dbg(smb_fname)));
 
+               if (!req) {
+                       DEBUG(0,("open_file_ntcreate: printer open without "
+                               "an SMB request!\n"));
+                       return NT_STATUS_INTERNAL_ERROR;
+               }
+
                return print_fsp_open(req, conn, fname, req->vuid, fsp,
                                      &smb_fname->st);
        }