backport fix for bug #3018. (from 2.0 branch commit fe757163b8f7). SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 01:43:02 +0300
branchSDL-1.2
changeset 8816bf9b92cfad9
parent 880 281ee0037d92
child 882 d19c15cded82
backport fix for bug #3018. (from 2.0 branch commit fe757163b8f7).
fluidsynth.c
     1.1 --- a/fluidsynth.c	Sun Oct 07 01:40:20 2018 +0300
     1.2 +++ b/fluidsynth.c	Sun Oct 07 01:43:02 2018 +0300
     1.3 @@ -124,6 +124,7 @@
     1.4  	if ((buffer = (char*) SDL_malloc(size))) {
     1.5  		if(SDL_RWread(rw, buffer, size, 1) == 1) {
     1.6  			if (fluidsynth.fluid_player_add_mem(song->player, buffer, size) == FLUID_OK) {
     1.7 +				SDL_free(buffer);
     1.8  				return 1;
     1.9  			} else {
    1.10  				Mix_SetError("FluidSynth failed to load in-memory song");