Skip to content

Commit

Permalink
Fixed a potential free()ing of a NULL pointer in
Browse files Browse the repository at this point in the history
 __PHYSFS_platformEnumerateFiles.
  • Loading branch information
icculus committed Aug 23, 2001
1 parent 2ce1793 commit e6bebfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/unix.c
Expand Up @@ -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 */

Expand Down

0 comments on commit e6bebfa

Please sign in to comment.