shithub: choc

Download patch

ref: 64b36dc6c7aeca3c5326537c34899bd41ebf6755
parent: b64e421ccf21b0d187cc94bc42c605ae32aac1c7
author: Roman Fomin <rfomin@gmail.com>
date: Sat Nov 27 06:44:25 EST 2021

win midi: Fix memory leak

--- a/src/i_winmusic.c
+++ b/src/i_winmusic.c
@@ -259,6 +259,7 @@
 
         if (!MIDI_GetNextEvent(tracks[idx].iter, &event))
         {
+            MIDI_FreeIterator(tracks[idx].iter);
             tracks[idx].iter = NULL;
             continue;
         }