summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2013-03-03 02:13:27 +0000
committerSimon Howard2013-03-03 02:13:27 +0000
commitb2a59b3eec1dcc040f58bdd5e88bfed55face2fe (patch)
treed4f3a5730107395a3166eaea7dac01f1e7110516
parent0cd984759aa3d21b74c596cf930b6002dd425618 (diff)
downloadchocolate-doom-b2a59b3eec1dcc040f58bdd5e88bfed55face2fe.tar.gz
chocolate-doom-b2a59b3eec1dcc040f58bdd5e88bfed55face2fe.tar.bz2
chocolate-doom-b2a59b3eec1dcc040f58bdd5e88bfed55face2fe.zip
Fix improper freeing of temp_timidity_cfg.
Subversion-branch: /branches/v2-branch Subversion-revision: 2565
-rw-r--r--src/i_sdlmusic.c5
1 files 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);
}
}