strmbase: Clear the debug info before calling DeleteCriticalSection (Valgrind).

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-06-06 16:03:13 -05:00 committed by Alexandre Julliard
parent 93f3b062fd
commit 2cf4b6016e
1 changed files with 7 additions and 5 deletions

View File

@ -532,11 +532,13 @@ void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer,
filter->ops = ops;
}
void strmbase_filter_cleanup(struct strmbase_filter *This)
void strmbase_filter_cleanup(struct strmbase_filter *filter)
{
if (This->clock)
IReferenceClock_Release(This->clock);
if (filter->clock)
IReferenceClock_Release(filter->clock);
This->IBaseFilter_iface.lpVtbl = NULL;
DeleteCriticalSection(&This->csFilter);
filter->IBaseFilter_iface.lpVtbl = NULL;
if (filter->csFilter.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
filter->csFilter.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->csFilter);
}