Commit 14485c36 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

quartz: Avoid leaking penummt and mt on error.

parent b5158497
...@@ -867,8 +867,8 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, ...@@ -867,8 +867,8 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
{ {
ICOM_THIS_MULTI(IFilterGraphImpl, IFilterGraph2_vtbl, iface); ICOM_THIS_MULTI(IFilterGraphImpl, IFilterGraph2_vtbl, iface);
HRESULT hr; HRESULT hr;
AM_MEDIA_TYPE* mt; AM_MEDIA_TYPE* mt = NULL;
IEnumMediaTypes* penummt; IEnumMediaTypes* penummt = NULL;
ULONG nbmt; ULONG nbmt;
IEnumPins* penumpins; IEnumPins* penumpins;
IEnumMoniker* pEnumMoniker; IEnumMoniker* pEnumMoniker;
...@@ -1095,10 +1095,11 @@ error: ...@@ -1095,10 +1095,11 @@ error:
} }
} }
out:
if (penummt)
IEnumMediaTypes_Release(penummt); IEnumMediaTypes_Release(penummt);
if (mt)
DeleteMediaType(mt); DeleteMediaType(mt);
out:
--This->recursioncount; --This->recursioncount;
LeaveCriticalSection(&This->cs); LeaveCriticalSection(&This->cs);
TRACE("--> %08x\n", hr); TRACE("--> %08x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment