[ofw] memory leak on error flow in winmad and winverb
Uri Habusha
urih at mellanox.co.il
Tue Nov 16 11:56:43 PST 2010
Hi,
While debugging a BS in winmad I see that a bug with WmCreateControlDevice function. When WdfDeviceCreateSymbolicLink and other operation is failed, the code calls to WdfObjectDelete but doesn't free the WDF init object
Uri
Index: winmad/kernel/wm_driver.c
===================================================================
--- winmad/kernel/wm_driver.c (revision 2996)
+++ winmad/kernel/wm_driver.c (working copy)
@@ -220,7 +220,6 @@
err2:
WdfObjectDelete(ControlDevice);
- return;
err1:
WdfDeviceInitFree(pinit);
}
Index: winverbs/kernel/wv_driver.c
===================================================================
--- winverbs/kernel/wv_driver.c (revision 2996)
+++ winverbs/kernel/wv_driver.c (working copy)
@@ -459,7 +459,6 @@
err2:
WdfObjectDelete(ControlDevice);
- return;
err1:
WdfDeviceInitFree(pinit);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101116/13c8c735/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memory_leak_in_error_flow.patch
Type: application/octet-stream
Size: 636 bytes
Desc: memory_leak_in_error_flow.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101116/13c8c735/attachment.obj>
More information about the ofw
mailing list