From 5919c4adccb97f3590456bb0d7bdc800ef79d52a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 16 Jun 2019 17:43:43 -0400 Subject: [PATCH] Fix memory leak of mapJ variable in MIDI-Map. --- src/Core/MIDI_Map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/MIDI_Map.cpp b/src/Core/MIDI_Map.cpp index 82d0600e..b2d13e09 100644 --- a/src/Core/MIDI_Map.cpp +++ b/src/Core/MIDI_Map.cpp @@ -213,7 +213,7 @@ struct MIDI_Map : Module { json_object_set_new(mapJ, "cc", json_integer(ccs[id])); json_object_set_new(mapJ, "moduleId", json_integer(paramHandles[id].moduleId)); json_object_set_new(mapJ, "paramId", json_integer(paramHandles[id].paramId)); - json_array_append(mapsJ, mapJ); + json_array_append_new(mapsJ, mapJ); } json_object_set_new(rootJ, "maps", mapsJ);