From: Ben Chalmers Date: Mon, 23 Apr 2018 08:46:39 +0000 (+0100) Subject: Check Mdl, not Controller->Mdl for allocation failure X-Git-Tag: 8.2.1^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=659c96ef2c233c54749b1f301a15a62946a3ee38;p=pvdrivers%2Fwin%2Fxenvif.git Check Mdl, not Controller->Mdl for allocation failure Ensure we fall through error handlers, rather than BSOD. Signed-off-by: Ben Chalmers Also fix another instance of the incorrect check. Signed-off-by: Paul Durrant --- diff --git a/src/xenvif/controller.c b/src/xenvif/controller.c index a542c0d..a52584f 100644 --- a/src/xenvif/controller.c +++ b/src/xenvif/controller.c @@ -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);