Fixed a potential free()ing of a NULL pointer in

__PHYSFS_platformEnumerateFiles.
This commit is contained in:
Ryan C. Gordon 2001-08-23 15:06:15 +00:00
parent 2ce179303b
commit e6bebfa32c
1 changed files with 3 additions and 1 deletions

View File

@ -403,8 +403,10 @@ LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname,
l->next = NULL;
} /* while */
if (buf != NULL)
free(buf);
closedir(dir);
free(buf);
return(retval);
} /* __PHYSFS_platformEnumerateFiles */