quartz: Fix some critical section leaks (Valgrind).

This commit is contained in:
Sven Baars 2023-08-01 16:28:03 +02:00 committed by Alexandre Julliard
parent f03ae651e6
commit c5ca3b0011
2 changed files with 5 additions and 3 deletions

View file

@ -333,14 +333,15 @@ static void async_reader_destroy(struct strmbase_filter *iface)
free(filter->requests);
}
CloseHandle(filter->file);
filter->sample_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->sample_cs);
strmbase_source_cleanup(&filter->source);
free(filter->pszFileName);
FreeMediaType(&filter->mt);
}
filter->sample_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->sample_cs);
PostQueuedCompletionStatus(filter->port, 0, 1, NULL);
WaitForSingleObject(filter->io_thread, INFINITE);
CloseHandle(filter->io_thread);

View file

@ -486,8 +486,9 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown *iface)
}
LeaveCriticalSection(&message_cs);
This->cs.DebugInfo->Spare[0] = 0;
This->event_cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->event_cs);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
free(This);
}