xaudio2_7: Unset DebugInfo->Spare[0] before destroying critical sections.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-02-12 06:12:12 +01:00 committed by Alexandre Julliard
parent 0fb6168fed
commit caff64333f
1 changed files with 3 additions and 0 deletions

View File

@ -1252,12 +1252,14 @@ static ULONG WINAPI IXAudio2Impl_Release(IXAudio2 *iface)
LIST_FOR_EACH_ENTRY_SAFE(src, src2, &This->source_voices, XA2SourceImpl, entry){
HeapFree(GetProcessHeap(), 0, src->sends);
IXAudio2SourceVoice_DestroyVoice(&src->IXAudio2SourceVoice_iface);
src->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&src->lock);
HeapFree(GetProcessHeap(), 0, src);
}
LIST_FOR_EACH_ENTRY_SAFE(sub, sub2, &This->submix_voices, XA2SubmixImpl, entry){
IXAudio2SubmixVoice_DestroyVoice(&sub->IXAudio2SubmixVoice_iface);
sub->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&sub->lock);
HeapFree(GetProcessHeap(), 0, sub);
}
@ -1273,6 +1275,7 @@ static ULONG WINAPI IXAudio2Impl_Release(IXAudio2 *iface)
CloseHandle(This->mmevt);
This->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->lock);
HeapFree(GetProcessHeap(), 0, This);