virtio-wdf: BZ#1549577: Check physical memory allocation in virtio library for NULL
Check the allocated pointer before filling the memory.
@@ -56,7 +56,9 @@ static void *mem_alloc_contiguous_pages(void *context, size_t size)
#else
ret = MmAllocateContiguousMemory(size, HighestAcceptable);
#endif
+ if (ret != NULL) {
RtlZeroMemory(ret, size);
+ }
return ret;
}
