[ofw] memory leak on error flow in winmad and winverb

Hefty, Sean sean.hefty at intel.com
Wed Nov 17 07:17:06 PST 2010


> "If your driver receives a WDFDEVICE_INIT structure from a call to
> WdfPdoInitAllocate or WdfControlDeviceInitAllocate, and if the driver
> subsequently encounters an error when it calls a device object
> initialization method or WdfDeviceCreate, the driver must call
> WdfDeviceInitFree."
> [Uri Habusha] I have to say that this sentence isn't clear. It says what to
> do when WdfDeviceCreate function is failed. It doesn't say what to do if it
> success.
> 
> "After the driver calls WdfDeviceCreate, it can no longer access the
> WDFDEVICE_INIT structure"
> [Uri Habusha] Is it appears in documentation or is it your interpretation.
> I didn't found it in my doc (see http://msdn.microsoft.com/en-
> us/library/ff546050(VS.85).aspx)

The above quotes were pulled from the documentation.  They came from different functions.





More information about the ofw mailing list