qcap: Fixed another use-after free (Coverity).

This commit is contained in:
Marcus Meissner 2012-08-17 23:07:11 +02:00 committed by Alexandre Julliard
parent 524ff6fe27
commit 985d2ba18e
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}