Fix memory leak in Strife related to finding voices.wad (fix #1118)
This commit is contained in:
parent
2b20ce64a8
commit
b9f75eb05e
1 changed files with 2 additions and 1 deletions
|
|
@ -858,7 +858,7 @@ void D_IdentifyVersion(void)
|
||||||
if(!M_FileExists(voiceswad))
|
if(!M_FileExists(voiceswad))
|
||||||
Z_Free(voiceswad);
|
Z_Free(voiceswad);
|
||||||
else
|
else
|
||||||
name = voiceswad; // STRIFE-FIXME: memory leak!!
|
name = voiceswad;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not found? try global search paths
|
// not found? try global search paths
|
||||||
|
|
@ -877,6 +877,7 @@ void D_IdentifyVersion(void)
|
||||||
{
|
{
|
||||||
// add it.
|
// add it.
|
||||||
D_AddFile(name);
|
D_AddFile(name);
|
||||||
|
p ? Z_Free(name) : free(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue