ref: b9f75eb05e0ce716e001ad89635758648d6f9ab9
parent: 2b20ce64a869e112be68217f1d44ca2c870d0d0e
author: mfrancis95 <mikefrancis95@gmail.com>
date: Sat Dec 8 15:56:01 EST 2018
Fix memory leak in Strife related to finding voices.wad (fix #1118)
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -858,7 +858,7 @@
if(!M_FileExists(voiceswad))
Z_Free(voiceswad);
else
- name = voiceswad; // STRIFE-FIXME: memory leak!!
+ name = voiceswad;
}
// not found? try global search paths
@@ -877,6 +877,7 @@
{
// add it.
D_AddFile(name);
+ p ? Z_Free(name) : free(name);
}
}
}