platform/unix.c
changeset 67 5000499d4ee2
parent 63 cb9a4714b844
child 69 546a95cc5591
--- a/platform/unix.c	Thu Aug 23 14:31:00 2001 +0000
+++ b/platform/unix.c	Thu Aug 23 15:06:15 2001 +0000
@@ -403,8 +403,10 @@
         l->next = NULL;
     } /* while */
 
+    if (buf != NULL)
+        free(buf);
+
     closedir(dir);
-    free(buf);
     return(retval);
 } /* __PHYSFS_platformEnumerateFiles */