Explorar o código

Bugfix for infinite loop/touching free()'d memory during PHYSFS_deinit().

Ryan C. Gordon %!s(int64=25) %!d(string=hai) anos
pai
achega
2827a86e87
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      physfs.c

+ 2 - 2
physfs.c

@@ -152,7 +152,7 @@ static void freeErrorMessages(void)
 
     for (i = errorMessages; i != NULL; i = next)
     {
-        next = i;
+        next = i->next;
         free(i);
     } /* for */
 } /* freeErrorMessages */
@@ -414,7 +414,7 @@ static void freeSearchPath(void)
     {
         for (i = searchPath; i != NULL; i = next)
         {
-            next = i;
+            next = i->next;
             freeDirInfo(i, openReadList);
         } /* for */
         searchPath = NULL;