]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Check Mdl, not Controller->Mdl for allocation failure
authorBen Chalmers <ben.chalmers@citrix.com>
Mon, 23 Apr 2018 08:46:39 +0000 (09:46 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 23 Apr 2018 08:48:06 +0000 (09:48 +0100)
Ensure we fall through error handlers, rather than BSOD.

Signed-off-by: Ben Chalmers <ben.chalmers@citrix.com>
Also fix another instance of the incorrect check.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvif/controller.c

index 004bccb0a910e9a489cd634192ee76045a62784c..35901a264388e96f29abe41bf2a08e0fe23d4e8a 100644 (file)
@@ -901,7 +901,7 @@ ControllerSetHashKey(
     Mdl = __AllocatePage();
 
     status = STATUS_NO_MEMORY;
-    if (Controller->Mdl == NULL)
+    if (Mdl == NULL)
         goto fail1;
 
     ASSERT(Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA);
@@ -1080,7 +1080,7 @@ ControllerSetHashMapping(
     Mdl = __AllocatePage();
 
     status = STATUS_NO_MEMORY;
-    if (Controller->Mdl == NULL)
+    if (Mdl == NULL)
         goto fail2;
 
     ASSERT(Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA);