qcap: Fix a mem leak on an error path. Found by Smatch.
Michael Stefaniuc
mstefani at redhat.de
Sun Nov 18 17:19:47 CST 2007
Though the error path is never accessed as OutputPin_Init() returns
always S_OK.
A nicer way would be to change OutputPin_Init() to return void and thus
eliminate that specific error path completely. But i have no clue about
COM and thus I take the "easy" way first ...
---
dlls/qcap/vfwcapture.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index b461054..5e46335 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -767,6 +767,8 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec,
*ppPin = (IPin *)(&pPinImpl->pin.pin.lpVtbl);
return S_OK;
}
+
+ CoTaskMemFree(pPinImpl);
return E_FAIL;
}
--
1.5.3.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071119/ba3e6805/attachment.pgp
More information about the wine-patches
mailing list