Module: wine Branch: master Commit: 80e61defa1053c32a2947e040c3a5260f9ad0acc URL: https://source.winehq.org/git/wine.git/?a=commit;h=80e61defa1053c32a2947e040...
Author: Zebediah Figura z.figura12@gmail.com Date: Wed May 22 21:44:51 2019 -0500
qcap/smartteefilter: Use strmbase_filter_cleanup().
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/qcap/smartteefilter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 268e7a2..cbcbc45 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -104,7 +104,7 @@ static ULONG WINAPI Unknown_AddRef(IUnknown *iface) static ULONG WINAPI Unknown_Release(IUnknown *iface) { SmartTeeFilter *This = impl_from_IUnknown(iface); - ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + ULONG ref = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p)->() ref=%d\n", This, ref);
@@ -115,6 +115,7 @@ static ULONG WINAPI Unknown_Release(IUnknown *iface) BaseOutputPinImpl_Release(&This->capture->pin.IPin_iface); if(This->preview) BaseOutputPinImpl_Release(&This->preview->pin.IPin_iface); + strmbase_filter_cleanup(&This->filter); CoTaskMemFree(This); } return ref; @@ -597,8 +598,8 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
This = CoTaskMemAlloc(sizeof(*This)); if (This == NULL) { - hr = E_OUTOFMEMORY; - goto end; + *phr = E_OUTOFMEMORY; + return NULL; } memset(This, 0, sizeof(*This)); This->IUnknown_iface.lpVtbl = &UnknownVtbl; @@ -638,8 +639,7 @@ end: else return (IUnknown*)&This->filter.IBaseFilter_iface; } else { - if (This) - IBaseFilter_Release(&This->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&This->filter); return NULL; } }