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>
This commit is contained in:
yuri.benditovich@daynix.com 2017-05-25 16:06:38 +03:00 committed by Frediano Ziglio
parent 9b55ed7041
commit 115477d9b3

View File

@ -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;
}
}