src/utils_cache.c: uc_check_timeout: Don't free a `ce' from the previous iteration.
authorFlorian Forster <octo@huhu.verplant.org>
Wed, 8 Jul 2009 08:51:28 +0000 (10:51 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Wed, 8 Jul 2009 08:51:28 +0000 (10:51 +0200)
This may habe been a cause of the reported assertion failure, too.

src/utils_cache.c

index 2f70ffe..7b584c5 100644 (file)
@@ -304,7 +304,6 @@ int uc_check_timeout (void)
       }
       sfree (keys[i]);
       sfree (key);
-      cache_free (ce);
       continue;
     }
 
@@ -350,6 +349,10 @@ int uc_check_timeout (void)
          keys[i], status);
       sfree (keys[i]);
     }
+
+    /* Make really sure the next iteration doesn't work with this pointer.
+     * There have been too many bugs in the past.. :/  -- octo */
+    ce = NULL;
   } /* for (keys[i]) */
 
   c_avl_iterator_destroy (iter);