Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/quartz/avisplit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index f3eccedcfc..24180aa9cc 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -1442,13 +1442,20 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) /* Note: This memory is managed by the transform filter once created */ This = CoTaskMemAlloc(sizeof(AVISplitterImpl));
- This->streams = NULL; - This->oldindex = NULL; + if (!This) + return E_OUTOFMEMORY;
+ ZeroMemory(This, sizeof(AVISplitterImpl)); hr = Parser_Create(&(This->Parser), &AVISplitterImpl_Vtbl, &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Flush, AVISplitter_Disconnect, AVISplitter_first_request, AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
if (FAILED(hr)) + { + CoTaskMemFree(This); return hr; + } + + This->streams = NULL; + This->oldindex = NULL;
*ppv = &This->Parser.filter.IBaseFilter_iface;