summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/open.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index d6331ee487..72370c8c7c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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);
}