[Spice-devel] [PATCH 2/3] qxl-wddm-dod: Prevent potential memory leak in class driver
Yuri Benditovich
yuri.benditovich at daynix.com
Thu May 25 13:06:38 UTC 2017
In case the device initializes 4 memory bars, the driver maps
physical memory of bar 4 and never unmaps it. Fixing it by
immediate unmap of unused memory bars.
Signed-off-by: Yuri Benditovich <yuri.benditovich at daynix.com>
---
qxldod/QxlDod.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index bb71f22..6b0cc5e 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3430,6 +3430,8 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
pci_range = QXL_PCI_RANGES;
break;
default:
+ DbgPrint(TRACE_LEVEL_WARNING, ("Unused memory range found\n"));
+ pDxgkInterface->DxgkCbUnmapMemory(pDxgkInterface->DeviceHandle, MemBase);
break;
}
}
--
2.7.0.windows.1
More information about the Spice-devel
mailing list