[PATCH] qcap: fixed another use-after free (Coverity)
Marcus Meissner
marcus at jet.franken.de
Fri Aug 17 16:07:11 CDT 2012
CID 71409
Ciao, Marcus
---
dlls/qcap/vfwcapture.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index 7be59cc..227a671 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -793,11 +793,11 @@ VfwPin_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum)
VfwPinImpl *This = (VfwPinImpl *)iface;
hr = qcap_driver_get_format(This->driver_info, &pmt);
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr)) {
hr = BasePinImpl_EnumMediaTypes(iface, ppEnum);
+ DeleteMediaType(pmt);
+ }
TRACE("%p -- %x\n", This, hr);
- DeleteMediaType(pmt);
-
return hr;
}
--
1.7.3.4
More information about the wine-patches
mailing list