From: shefty Date: Thu, 27 Aug 2009 18:51:37 +0000 (+0000) Subject: winverbs: free port array X-Git-Url: http://git.etherboot.org/mirror/winof/.git/commitdiff_plain/dc1ee5b228b820bccbcb4f15ae5286e67816483f winverbs: free port array Fix a memory leak. We need to free the port array, which is allocated separately from the device structure. Signed-off-by: Sean Hefty git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2386 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/core/winverbs/kernel/wv_device.c b/core/winverbs/kernel/wv_device.c index 5cc20bd6..846f0b0b 100644 --- a/core/winverbs/kernel/wv_device.c +++ b/core/winverbs/kernel/wv_device.c @@ -367,6 +367,9 @@ static void WvDeviceFreePorts(WV_DEVICE *pDevice) WdfIoQueuePurgeSynchronously(pDevice->pPorts[i].Queue); WdfObjectDelete(pDevice->pPorts[i].Queue); } + if (pDevice->pPorts != NULL) { + ExFreePoolWithTag(pDevice->pPorts, 'cpvw'); + } } void WvDeviceFree(WV_DEVICE *pDevice)