mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 23:54:07 +00:00
dsound: Avoid using pointer value after free.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
parent
e2f7f01ac8
commit
164a4070db
|
@ -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)
|
||||
|
|
|
@ -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) );
|
||||
HeapFree(GetProcessHeap(), 0, device);
|
||||
TRACE("(%p) released\n", device);
|
||||
HeapFree(GetProcessHeap(), 0, 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);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -91,8 +91,8 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface)
|
|||
TRACE("(%p) ref %ld\n", This, ref);
|
||||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
TRACE("(%p) released\n", This);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue