ref: b2a59b3eec1dcc040f58bdd5e88bfed55face2fe
parent: 0cd984759aa3d21b74c596cf930b6002dd425618
author: Simon Howard <fraggle@gmail.com>
date: Sat Mar 2 21:13:27 EST 2013
Fix improper freeing of temp_timidity_cfg. Subversion-branch: /branches/v2-branch Subversion-revision: 2565
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -79,7 +79,7 @@
if (fstream == NULL)
{
- free(temp_timidity_cfg);
+ Z_Free(temp_timidity_cfg);
temp_timidity_cfg = NULL;
return;
}
@@ -102,7 +102,6 @@
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 @@
if (temp_timidity_cfg != NULL)
{
remove(temp_timidity_cfg);
- free(temp_timidity_cfg);
+ Z_Free(temp_timidity_cfg);
}
}