Commit 84fd6e62 authored by Michael Karcher's avatar Michael Karcher Committed by Alexandre Julliard

dsound: Fix double free in dsound capture.

parent 9dc3ecb9
......@@ -860,6 +860,12 @@ IDirectSoundCaptureBufferImpl_Release( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
if (This->notify)
IDirectSoundNotify_Release((LPDIRECTSOUNDNOTIFY)This->notify);
/* If driver manages its own buffer, IDsCaptureDriverBuffer_Release
should have freed the buffer. Prevent freeing it again in
IDirectSoundCaptureBufferImpl_Create */
if (!(This->device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY))
This->device->buffer = NULL;
HeapFree(GetProcessHeap(), 0, This->notifies);
HeapFree( GetProcessHeap(), 0, This );
TRACE("(%p) released\n", This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment