1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-09 04:16:08 +00:00

dsound: Avoid using pointer value after free.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
Rémi Bernon 2022-05-22 16:49:35 +02:00 committed by Alexandre Julliard
parent e2f7f01ac8
commit 164a4070db
5 changed files with 9 additions and 9 deletions

View File

@ -1192,9 +1192,9 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
HeapFree(GetProcessHeap(), 0, This->filters);
}
HeapFree(GetProcessHeap(), 0, This);
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(), 0, This);
}
BOOL secondarybuffer_is_audible(IDirectSoundBufferImpl *This)

View File

@ -109,8 +109,8 @@ static void capturebuffer_destroy(IDirectSoundCaptureBufferImpl *This)
This->device->capture_buffer = NULL;
HeapFree(GetProcessHeap(), 0, This->notifies);
HeapFree(GetProcessHeap(), 0, This);
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(), 0, This);
}
/*******************************************************************************
@ -871,8 +871,8 @@ static ULONG DirectSoundCaptureDevice_Release(
HeapFree(GetProcessHeap(), 0, device->pwfx);
device->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection( &(device->lock) );
TRACE("(%p) released\n", device);
HeapFree(GetProcessHeap(), 0, device);
TRACE("(%p) released\n", device);
}
return ref;
}
@ -1099,8 +1099,8 @@ static void capture_destroy(IDirectSoundCaptureImpl *This)
{
if (This->device)
DirectSoundCaptureDevice_Release(This->device);
HeapFree(GetProcessHeap(),0,This);
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(),0,This);
}
/*******************************************************************************

View File

@ -239,8 +239,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
HeapFree(GetProcessHeap(), 0, device->buffer);
device->mixlock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&device->mixlock);
HeapFree(GetProcessHeap(),0,device);
TRACE("(%p) released\n", device);
HeapFree(GetProcessHeap(),0,device);
}
return ref;
}
@ -670,8 +670,8 @@ static void directsound_destroy(IDirectSoundImpl *This)
{
if (This->device)
DirectSoundDevice_Release(This->device);
HeapFree(GetProcessHeap(),0,This);
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(),0,This);
}
static inline IDirectSoundImpl *impl_from_IUnknown(IUnknown *iface)

View File

@ -61,8 +61,8 @@ static void fullduplex_destroy(IDirectSoundFullDuplexImpl *This)
while(IDirectSoundCapture_Release(dsc8) > 0);
IUnknown_Release(This->dsc8_unk);
}
HeapFree(GetProcessHeap(), 0, This);
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(), 0, This);
}
/*******************************************************************************

View File

@ -91,8 +91,8 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
TRACE("(%p) ref %ld\n", This, ref);
if (!ref) {
TRACE("(%p) released\n", This);
HeapFree(GetProcessHeap(), 0, This);
TRACE("(%p) released\n", This);
}
return ref;
}