X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_cache.c;h=7b584c5c65231471f3525446a05d187278d79bf3;hb=984f37cb1a5813d2a089129ebf906a9963b6f7c8;hp=2f70ffe8d1f6d99dd3bf605ec922d22d68c307d5;hpb=526320a0389a54a3629038fe6b34da8c6d4eec0e;p=collectd.git diff --git a/src/utils_cache.c b/src/utils_cache.c index 2f70ffe8..7b584c5c 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -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);