From caff64333f6dfee3b99cc067ed522da101f40a6a Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 12 Feb 2016 06:12:12 +0100 Subject: [PATCH] xaudio2_7: Unset DebugInfo->Spare[0] before destroying critical sections. Signed-off-by: Sebastian Lackner Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/xaudio2_7/xaudio_dll.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 503c974cb6d..13935994b72 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -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);