dsound: Fix double free in dsound capture.
This commit is contained in:
parent
9dc3ecb9e3
commit
84fd6e629a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue