[PATCH 2/4] dmstyle: Free list when Style track is destroyed
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/dmstyle/styletrack.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index 496e0c5ba7..cbaba0a16a 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -20,6 +20,8 @@ #include "dmstyle_private.h" #include "dmobject.h" +#include "wine/heap.h" + WINE_DEFAULT_DEBUG_CHANNEL(dmstyle); WINE_DECLARE_DEBUG_CHANNEL(dmfile); @@ -80,7 +82,18 @@ static ULONG WINAPI style_track_Release(IDirectMusicTrack8 *iface) TRACE("(%p) ref=%d\n", This, ref); if (!ref) { - HeapFree(GetProcessHeap(), 0, This); + struct list* cursor, *cursor2; + LPDMUS_PRIVATE_STYLE_ITEM item; + + LIST_FOR_EACH_SAFE (cursor, cursor2, &This->Items) { + item = LIST_ENTRY(cursor, DMUS_PRIVATE_STYLE_ITEM, entry); + list_remove(cursor); + + IDirectMusicStyle8_Release(item->pObject); + heap_free(item); + } + + heap_free(This); DMSTYLE_UnlockModule(); } -- 2.17.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=60111 Your paranoid android. === debian10 (build log) === 0030:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 0037:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 0030:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 0037:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. === debian10 (build log) === 0031:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 0038:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 002f:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work. 0036:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.
participants (2)
-
Alistair Leslie-Hughes -
Marvin