backport fix for bug #1833. (from 2.0 branch commit 7ead8213dfb0). SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 00:08:00 +0300
branchSDL-1.2
changeset 871284d10d87cc9
parent 870 329ecac70afb
child 872 854ab2f1b51c
backport fix for bug #1833. (from 2.0 branch commit 7ead8213dfb0).
music.c
     1.1 --- a/music.c	Sun Oct 07 00:02:40 2018 +0300
     1.2 +++ b/music.c	Sun Oct 07 00:08:00 2018 +0300
     1.3 @@ -622,6 +622,7 @@
     1.4  			int start = SDL_RWtell(rw);
     1.5  			if (SDL_RWread(rw, magic, 1, 4) != 4) {
     1.6  				Mix_SetError("Couldn't read from RWops");
     1.7 +				SDL_free(music);
     1.8  				return MUS_NONE;
     1.9  			}
    1.10  			SDL_RWseek(rw, start, RW_SEEK_SET);