From 5e267aaaf466737a9105a8800d1be796fca9d272 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 7 Oct 2018 00:08:00 +0300 Subject: [PATCH] backport fix for bug #1833. (from 2.0 branch commit 7ead8213dfb0). --- music.c | 1 + 1 file changed, 1 insertion(+) diff --git a/music.c b/music.c index 54bdc18f..90eba7aa 100644 --- a/music.c +++ b/music.c @@ -622,6 +622,7 @@ Mix_Music *Mix_LoadMUSType_RW(SDL_RWops *rw, Mix_MusicType type, int freesrc) int start = SDL_RWtell(rw); if (SDL_RWread(rw, magic, 1, 4) != 4) { Mix_SetError("Couldn't read from RWops"); + SDL_free(music); return MUS_NONE; } SDL_RWseek(rw, start, RW_SEEK_SET);