Commit 791e15b5 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dmime: Free list when Tempo track is destroyed.

parent eeca42b3
......@@ -21,6 +21,8 @@
#include "dmime_private.h"
#include "dmobject.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
WINE_DECLARE_DEBUG_CHANNEL(dmfile);
......@@ -82,7 +84,17 @@ static ULONG WINAPI tempo_track_Release(IDirectMusicTrack8 *iface)
TRACE("(%p) ref=%d\n", This, ref);
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
struct list *cursor, *cursor2;
DMUS_PRIVATE_TEMPO_ITEM *item;
LIST_FOR_EACH_SAFE(cursor, cursor2, &This->Items) {
item = LIST_ENTRY(cursor, DMUS_PRIVATE_TEMPO_ITEM, entry);
list_remove(cursor);
heap_free(item);
}
heap_free(This);
DMIME_UnlockModule();
}
......
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