From b2a59b3eec1dcc040f58bdd5e88bfed55face2fe Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 3 Mar 2013 02:13:27 +0000 Subject: Fix improper freeing of temp_timidity_cfg. Subversion-branch: /branches/v2-branch Subversion-revision: 2565 --- src/i_sdlmusic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c index 12167665..e1f9212d 100644 --- a/src/i_sdlmusic.c +++ b/src/i_sdlmusic.c @@ -79,7 +79,7 @@ void I_InitTimidityConfig(void) if (fstream == NULL) { - free(temp_timidity_cfg); + Z_Free(temp_timidity_cfg); temp_timidity_cfg = NULL; return; } @@ -102,7 +102,6 @@ void I_InitTimidityConfig(void) env_string = malloc(strlen(temp_timidity_cfg) + 15); sprintf(env_string, "TIMIDITY_CFG=%s", temp_timidity_cfg); putenv(env_string); - free(env_string); } // Remove the temporary config file generated by I_InitTimidityConfig(). @@ -112,7 +111,7 @@ static void RemoveTimidityConfig(void) if (temp_timidity_cfg != NULL) { remove(temp_timidity_cfg); - free(temp_timidity_cfg); + Z_Free(temp_timidity_cfg); } } -- cgit v1.2.3