From 2593c76c22a38af42123c06209d87d8632bf6621 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 7 Oct 2018 01:43:02 +0300 Subject: [PATCH] backport fix for bug #3018. (from 2.0 branch commit fe757163b8f7). --- fluidsynth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fluidsynth.c b/fluidsynth.c index ea1e2880..41978d18 100644 --- a/fluidsynth.c +++ b/fluidsynth.c @@ -124,6 +124,7 @@ static int fluidsynth_loadsong_RW_internal(FluidSynthMidiSong *song, void *data) if ((buffer = (char*) SDL_malloc(size))) { if(SDL_RWread(rw, buffer, size, 1) == 1) { if (fluidsynth.fluid_player_add_mem(song->player, buffer, size) == FLUID_OK) { + SDL_free(buffer); return 1; } else { Mix_SetError("FluidSynth failed to load in-memory song");