]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Check Mdl, not Controller->Mdl for allocation failure 8.2.1
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:56:32 +0000 (09:56 +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 a542c0d92eab45dd8cbad2acdd7b1720c82e33af..a52584f2878537d8955947600bd3ffaac7a1f9c3 100644 (file)
@@ -893,7 +893,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);
@@ -1072,7 +1072,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);