mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix memory leaks in editor sound list
git-svn-id: https://svn.eduke32.com/eduke32@7052 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f354f824f4
commit
b3914431b0
1 changed files with 4 additions and 2 deletions
|
@ -1751,6 +1751,7 @@ static int32_t sort_sounds(int32_t how)
|
||||||
{
|
{
|
||||||
case 'g': // restore original order
|
case 'g': // restore original order
|
||||||
Bmemcpy(g_sndnum, g_definedsndnum, sizeof(int16_t)*n);
|
Bmemcpy(g_sndnum, g_definedsndnum, sizeof(int16_t)*n);
|
||||||
|
Bfree(dst);
|
||||||
return 0;
|
return 0;
|
||||||
case 's':
|
case 's':
|
||||||
compare_sounds = compare_sounds_s;
|
compare_sounds = compare_sounds_s;
|
||||||
|
@ -1777,6 +1778,7 @@ static int32_t sort_sounds(int32_t how)
|
||||||
compare_sounds = compare_sounds_5;
|
compare_sounds = compare_sounds_5;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Bfree(dst);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9117,6 +9119,7 @@ static int32_t osdcmd_do(osdfuncparm_t const * const parm)
|
||||||
if (g_numCompilerErrors)
|
if (g_numCompilerErrors)
|
||||||
{
|
{
|
||||||
// g_scriptPtr = script + oscrofs; // handled in C_Compile()
|
// g_scriptPtr = script + oscrofs; // handled in C_Compile()
|
||||||
|
Bfree(tp);
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9320,9 +9323,8 @@ static int32_t parsegroupfiles(scriptfile *script);
|
||||||
|
|
||||||
static void parsegroupfiles_include(const char *fn, scriptfile *script, const char *cmdtokptr)
|
static void parsegroupfiles_include(const char *fn, scriptfile *script, const char *cmdtokptr)
|
||||||
{
|
{
|
||||||
scriptfile *included;
|
scriptfile *included = scriptfile_fromfile(fn);
|
||||||
|
|
||||||
included = scriptfile_fromfile(fn);
|
|
||||||
if (!included)
|
if (!included)
|
||||||
{
|
{
|
||||||
if (!Bstrcasecmp(cmdtokptr,"null"))
|
if (!Bstrcasecmp(cmdtokptr,"null"))
|
||||||
|
|
Loading…
Reference in a new issue