From adc6948c4c02c1002209ffb4502b3d81390b9a4e Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Fri, 10 Sep 2004 22:30:05 +0000 Subject: [PATCH] Remove lock name from lock debug structure before deletion so it gets freed properly. --- dlls/dsound/buffer.c | 2 ++ dlls/dsound/capture.c | 2 ++ dlls/dsound/dsound.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 85fdde5b36f..8c833301690 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -394,6 +394,7 @@ static DWORD WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface) DSOUND_RemoveBuffer(This->dsound, This); + This->lock.DebugInfo->Spare[1] = 0; DeleteCriticalSection(&(This->lock)); if (This->hwbuf) { @@ -1223,6 +1224,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create( HeapFree(GetProcessHeap(),0,dsb->buffer->memory); if (dsb->buffer) HeapFree(GetProcessHeap(),0,dsb->buffer); + dsb->lock.DebugInfo->Spare[1] = 0; DeleteCriticalSection(&(dsb->lock)); HeapFree(GetProcessHeap(),0,dsb->pwfx); HeapFree(GetProcessHeap(),0,dsb); diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 1925ad7569f..1d550b80283 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -415,6 +415,7 @@ IDirectSoundCaptureImpl_Release( LPDIRECTSOUNDCAPTURE iface ) if (This->pwfx) HeapFree(GetProcessHeap(), 0, This->pwfx); + This->lock.DebugInfo->Spare[1] = 0; DeleteCriticalSection( &(This->lock) ); HeapFree( GetProcessHeap(), 0, This ); dsound_capture = NULL; @@ -1787,6 +1788,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface ) LeaveCriticalSection( &(This->lock) ); if ( uRef == 0 ) { + This->lock.DebugInfo->Spare[1] = 0; DeleteCriticalSection( &(This->lock) ); HeapFree( GetProcessHeap(), 0, This ); TRACE("(%p) released\n",This); diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 23a8e48364b..f1cba5e5de4 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -302,6 +302,7 @@ static ULONG WINAPI IDirectSoundImpl_Release( IDsDriver_Release(This->driver); RtlDeleteResource(&This->buffer_list_lock); + This->mixlock.DebugInfo->Spare[1] = 0; DeleteCriticalSection(&This->mixlock); HeapFree(GetProcessHeap(),0,This); dsound = NULL; @@ -604,6 +605,7 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer( hres = DSOUND_AddBuffer(This, dsb); if (hres != DS_OK) { IDirectSoundBuffer8_Release(psb); + dsb->lock.DebugInfo->Spare[1] = 0; DeleteCriticalSection(&(dsb->lock)); HeapFree(GetProcessHeap(),0,dsb->buffer); HeapFree(GetProcessHeap(),0,dsb->pwfx); -- 2.11.4.GIT