Remove lock name from lock debug structure before deletion so it gets
freed properly.
This commit is contained in:
parent
3d7299b7a4
commit
adc6948c4c
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue