Commit 1d3c40d5 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Delete buffer array when releasing last buffer.

parent eba29801
......@@ -404,6 +404,10 @@ static DWORD WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface) {
This->dsound->buffers = HeapReAlloc(GetProcessHeap(),0,This->dsound->buffers,sizeof(LPDIRECTSOUNDBUFFER8)*This->dsound->nrofbuffers);
TRACE("(%p) buffer count is now %d\n", This, This->dsound->nrofbuffers);
}
if (This->dsound->nrofbuffers == 0) {
HeapFree(GetProcessHeap(),0,This->dsound->buffers);
This->dsound->buffers = NULL;
}
RtlReleaseResource(&(This->dsound->lock));
DeleteCriticalSection(&(This->lock));
......
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