fix a memory leak that occurs when listing the search paths

This commit is contained in:
kreatordxx 2006-12-31 00:00:44 +00:00
parent 96ee4e1082
commit c557b38bbf
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20061231
--------
main/inferno.c: fix a memory leak that occurs when listing the search paths
20061230
--------
arch/sdl/mixmusic.c, include/cfile.h, include/hmp2mid.h, misc/hmp2mid.c: use PhysicsFS to write MIDI file, make hmp2mid use PhysicsFS exclusively

View file

@ -490,8 +490,10 @@ int main(int argc, char *argv[])
{
char **i, **list;
for (i = PHYSFS_getSearchPath(); *i != NULL; i++)
list = PHYSFS_getSearchPath();
for (i = list; *i != NULL; i++)
con_printf(CON_VERBOSE, "PHYSFS: [%s] is in the search path.\n", *i);
PHYSFS_freeList(list);
list = PHYSFS_getCdRomDirs();
for (i = list; *i != NULL; i++)