summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuri.benditovich@daynix.com <yuri.benditovich@daynix.com>2017-05-25 16:06:38 +0300
committerFrediano Ziglio <fziglio@redhat.com>2017-05-26 11:49:19 +0100
commit115477d9b33a9fed5cf6eafe5f98e3a15c517541 (patch)
tree54144506126802a976fbe883159edd38bbd576ae
parent9b55ed704196a5747a2beede179d9a6f82ccf20e (diff)
qxl-wddm-dod: Prevent potential memory leak in class driver
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@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rwxr-xr-xqxldod/QxlDod.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}
}