summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22d0700)
raw | patch | inline | side by side (parent: 22d0700)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 8 Jul 2009 11:19:57 +0000 (13:19 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 26 Jul 2009 13:05:20 +0000 (15:05 +0200) |
Make sure we do not try to free a (possibly some random) cache entry after
removing it from the AVL tree. Potentially, this might have caused invalid
free()s in some rare situations.
removing it from the AVL tree. Potentially, this might have caused invalid
free()s in some rare situations.
src/utils_cache.c | patch | blob | history |
diff --git a/src/utils_cache.c b/src/utils_cache.c
index 60d3283278e394dfd673029619cac16f7de64baf..33dc6b1508490fde259a988382ec48f32c0bfd96 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
{
DEBUG ("uc_check_timeout: %s is missing but ``uninteresting''",
keys[i]);
+ ce = NULL;
status = c_avl_remove (cache_tree, keys[i],
(void *) &key, (void *) &ce);
if (status != 0)
}
sfree (keys[i]);
sfree (key);
- cache_free (ce);
+ if (ce != NULL)
+ cache_free (ce);
continue;
}