On 7/4/22 14:05, Rémi Bernon wrote:
From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/winegstreamer/resampler.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/winegstreamer/resampler.c b/dlls/winegstreamer/resampler.c index ea000e3b96f..5965a337f20 100644 --- a/dlls/winegstreamer/resampler.c +++ b/dlls/winegstreamer/resampler.c @@ -435,7 +435,6 @@ failed: static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) { struct resampler *impl = impl_from_IMFTransform(iface);
IMFMediaType *ret; HRESULT hr;
TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
@@ -446,16 +445,15 @@ static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD i if (!impl->input_type) return MF_E_TRANSFORM_TYPE_NOT_SET;
- if (FAILED(hr = MFCreateMediaType(&ret)))
- if (FAILED(hr = MFCreateMediaType(type))) return hr;
- return IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)ret);
- return IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)*type); }
Does this leak "*type" if IMFMediaType::CopyAllItems() fails?
(Obviously this leak was present before, but now that I notice it...)