Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/quartz/waveparser.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index f6bea2c704..f8afc527b1 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -431,10 +431,17 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv) /* Note: This memory is managed by the transform filter once created */ This = CoTaskMemAlloc(sizeof(WAVEParserImpl));
+ if (!This) + return E_OUTOFMEMORY; + + ZeroMemory(This, sizeof(WAVEParserImpl)); hr = Parser_Create(&(This->Parser), &WAVEParser_Vtbl, &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect, WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
if (FAILED(hr)) + { + CoTaskMemFree(This); return hr; + }
*ppv = &This->Parser.filter.IBaseFilter_iface;