platform/posix.c
changeset 852 9467e96abdf1
parent 847 5e5e6c067413
child 939 684c583cb586
--- a/platform/posix.c	Wed Mar 21 20:19:20 2007 +0000
+++ b/platform/posix.c	Sat Mar 24 03:54:58 2007 +0000
@@ -186,8 +186,7 @@
     dir = opendir(dirname);
     if (dir == NULL)
     {
-        if (buf != NULL)
-            allocator.Free(buf);
+        allocator.Free(buf);
         return;
     } /* if */
 
@@ -220,9 +219,7 @@
         callback(callbackdata, origdir, ent->d_name);
     } /* while */
 
-    if (buf != NULL)
-        allocator.Free(buf);
-
+    allocator.Free(buf);
     closedir(dir);
 } /* __PHYSFS_platformEnumerateFiles */