s3: Fix Coverity ID 2582: FORWARD_NULL
authorVolker Lendecke <vl@samba.org>
Sun, 19 Jun 2011 17:23:47 +0000 (19:23 +0200)
committerVolker Lendecke <vlendec@samba.org>
Sun, 19 Jun 2011 18:46:43 +0000 (20:46 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jun 19 20:46:43 CEST 2011 on sn-devel-104

source3/smbd/smb2_ioctl.c

index a5b8326626c3d7e76165fc50bdf52ac3917e00a5..bce02b0a3a821650c8b6ea12eaa4423ee041dbda 100644 (file)
@@ -399,6 +399,11 @@ static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX *mem_ctx,
                char *pdata;
                NTSTATUS status;
 
+               if (fsp == NULL) {
+                       tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
+                       return tevent_req_post(req, ev);
+               }
+
                if (in_max_output < 16) {
                        DEBUG(0,("FSCTL_GET_SHADOW_COPY_DATA: "
                                 "in_max_output(%u) < 16 is invalid!\n",