Bugfix for infinite loop/touching free()'d memory during PHYSFS_deinit().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 09 Jul 2001 00:51:46 +0000
changeset 25 96b32c0fd7f3
parent 24 b050804123a3
child 26 575e03541d5e
Bugfix for infinite loop/touching free()'d memory during PHYSFS_deinit().
physfs.c
--- a/physfs.c	Mon Jul 09 00:49:41 2001 +0000
+++ b/physfs.c	Mon Jul 09 00:51:46 2001 +0000
@@ -152,7 +152,7 @@
 
     for (i = errorMessages; i != NULL; i = next)
     {
-        next = i;
+        next = i->next;
         free(i);
     } /* for */
 } /* freeErrorMessages */
@@ -414,7 +414,7 @@
     {
         for (i = searchPath; i != NULL; i = next)
         {
-            next = i;
+            next = i->next;
             freeDirInfo(i, openReadList);
         } /* for */
         searchPath = NULL;