Skip to content
Permalink
Browse files
Fixed a potential free()ing of a NULL pointer in
 __PHYSFS_platformEnumerateFiles.
  • Loading branch information
icculus committed Aug 23, 2001
1 parent 2ce1793 commit e6bebfa32c0df7f5dd7ad9c8ba54ea1a7149da0c
Showing with 3 additions and 1 deletion.
  1. +3 −1 platform/unix.c
@@ -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 */

0 comments on commit e6bebfa

Please sign in to comment.