Commit c5ca3b00 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

quartz: Fix some critical section leaks (Valgrind).

parent f03ae651
...@@ -333,14 +333,15 @@ static void async_reader_destroy(struct strmbase_filter *iface) ...@@ -333,14 +333,15 @@ static void async_reader_destroy(struct strmbase_filter *iface)
free(filter->requests); free(filter->requests);
} }
CloseHandle(filter->file); CloseHandle(filter->file);
filter->sample_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->sample_cs);
strmbase_source_cleanup(&filter->source); strmbase_source_cleanup(&filter->source);
free(filter->pszFileName); free(filter->pszFileName);
FreeMediaType(&filter->mt); FreeMediaType(&filter->mt);
} }
filter->sample_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->sample_cs);
PostQueuedCompletionStatus(filter->port, 0, 1, NULL); PostQueuedCompletionStatus(filter->port, 0, 1, NULL);
WaitForSingleObject(filter->io_thread, INFINITE); WaitForSingleObject(filter->io_thread, INFINITE);
CloseHandle(filter->io_thread); CloseHandle(filter->io_thread);
......
...@@ -486,8 +486,9 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown *iface) ...@@ -486,8 +486,9 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown *iface)
} }
LeaveCriticalSection(&message_cs); LeaveCriticalSection(&message_cs);
This->cs.DebugInfo->Spare[0] = 0; This->event_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->event_cs); DeleteCriticalSection(&This->event_cs);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs); DeleteCriticalSection(&This->cs);
free(This); free(This);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment