balloon: bsod fix
BSOD occured during "Wdf - Kmdf Fault Injection Test" if driver was
built without USE_BALLOON_SERVICE defined.
@@ -266,6 +266,9 @@ BalloonEvtDeviceContextCleanup(
devCtx->pfns_table = NULL;
}
+ if(devCtx->MemStats)
+ {
+
#ifndef USE_BALLOON_SERVICE
RtlFillMemory(devCtx->MemStats,
sizeof(BALLOON_STAT) * VIRTIO_BALLOON_S_NR, -1);
@@ -275,8 +278,6 @@ BalloonEvtDeviceContextCleanup(
}
#endif // !USE_BALLOON_SERVICE
- if(devCtx->MemStats)
- {
ExFreePoolWithTag(
devCtx->MemStats,
BALLOON_MGMT_POOL_TAG
