vp-build/srcpkgs/WildMidi/patches/0001-fix_medata_handling.patch

29 lines
859 B
Diff
Raw Normal View History

2018-11-15 04:00:59 +01:00
From 9302455eca76835cf27c6d5832314f5588c2fca7 Mon Sep 17 00:00:00 2001
From: sezero <sezero@users.sourceforge.net>
Date: Wed, 31 Oct 2018 14:20:00 +0300
Subject: [PATCH] freeMDI: free() mdi->tmp_info->copyright and mdi->tmp_info
closes https://github.com/Mindwerks/wildmidi/issues/204
commit d5d2b2780e36 had removed free()ing of mdi->tmp_info
without saying why, but it seems wrong?
---
src/internal_midi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/internal_midi.c b/src/internal_midi.c
index 53062da..ad05346 100644
--- src/internal_midi.c
+++ src/internal_midi.c
@@ -1996,6 +1996,10 @@ void _WM_freeMDI(struct _mdi *mdi) {
free(mdi->events);
_WM_free_reverb(mdi->reverb);
free(mdi->mix_buffer);
+ if (mdi->tmp_info) {
+ free(mdi->tmp_info->copyright);
+ free(mdi->tmp_info);
+ }
free(mdi);
}