diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index a7ebd9f9c93..947bb986da5 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -97,10 +97,12 @@ static HRESULT DSoundRender_InputPin_Construct(const PIN_INFO * pPinInfo, SAMPLE { pPinImpl->pin.lpVtbl = &DSoundRender_InputPin_Vtbl; pPinImpl->lpVtblMemInput = &MemInputPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 726776bfbef..73c92b2f481 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -880,6 +880,8 @@ static HRESULT FileAsyncReader_Construct(HANDLE hFile, IBaseFilter * pBaseFilter *ppPin = (IPin *)(&pPinImpl->pin.pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 39ea58b339c..94eb614842d 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -128,10 +128,12 @@ static HRESULT Parser_OutputPin_Construct(const PIN_INFO * pPinInfo, ALLOCATOR_P if (SUCCEEDED(Parser_OutputPin_Init(pPinInfo, props, pUserData, pQueryAccept, pmt, fSamplesPerSec, pCritSec, pPinImpl))) { pPinImpl->pin.pin.lpVtbl = &Parser_OutputPin_Vtbl; - + *ppPin = (IPin *)pPinImpl; return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } @@ -723,10 +725,12 @@ static HRESULT Parser_InputPin_Construct(const PIN_INFO * pPinInfo, SAMPLEPROC p if (SUCCEEDED(PullPin_Init(pPinInfo, pSampleProc, pUserData, pQueryAccept, pCritSec, pPinImpl))) { pPinImpl->pin.lpVtbl = &Parser_InputPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 9960dffe82d..08ddcefcd6d 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -147,10 +147,12 @@ HRESULT InputPin_Construct(const PIN_INFO * pPinInfo, SAMPLEPROC pSampleProc, LP { pPinImpl->pin.lpVtbl = &InputPin_Vtbl; pPinImpl->lpVtblMemInput = &MemInputPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } @@ -228,10 +230,12 @@ HRESULT OutputPin_Construct(const PIN_INFO * pPinInfo, ALLOCATOR_PROPERTIES *pro if (SUCCEEDED(OutputPin_Init(pPinInfo, props, pUserData, pQueryAccept, pCritSec, pPinImpl))) { pPinImpl->pin.lpVtbl = &OutputPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } @@ -1021,10 +1025,12 @@ HRESULT PullPin_Construct(const PIN_INFO * pPinInfo, SAMPLEPROC pSampleProc, LPV if (SUCCEEDED(PullPin_Init(pPinInfo, pSampleProc, pUserData, pQueryAccept, pCritSec, pPinImpl))) { pPinImpl->pin.lpVtbl = &PullPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index b63cacde02e..0570a90607a 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -107,6 +107,8 @@ static HRESULT TransformFilter_InputPin_Construct(const PIN_INFO * pPinInfo, SAM *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } @@ -136,6 +138,8 @@ static HRESULT TransformFilter_OutputPin_Construct(const PIN_INFO * pPinInfo, co *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; } diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index 9e76fd136da..67e601ebb42 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -277,10 +277,12 @@ static HRESULT VideoRenderer_InputPin_Construct(const PIN_INFO * pPinInfo, SAMPL { pPinImpl->pin.lpVtbl = &VideoRenderer_InputPin_Vtbl; pPinImpl->lpVtblMemInput = &MemInputPin_Vtbl; - + *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl); return S_OK; } + + CoTaskMemFree(pPinImpl); return E_FAIL; }