[collectd] Bug in utils_cache.c

Paul Sadauskas psadauskas at gmail.com
Tue Jul 7 21:16:48 CEST 2009


tokkee on IRC & I think we found a bug with utils_cache.c. The
uc_check_timeout function is missing a continue after the
"uninteresting" service check, that causes a key to be null.

Here's a quick patch:

diff --git a/src/utils_cache.c b/src/utils_cache.c
index 5e62aa4..ea46750 100644
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
@@ -345,6 +345,7 @@ int uc_check_timeout (void)
       sfree (keys[i]);
       sfree (key);
       cache_free (ce);
+      continue;
     }

     /* If we get here, the value is ``interesting''. Query the record from the


I have a backtrace showing the log and error message here:
http://gist.github.com/142274

I'm not sure if this is all that's needed, or even tested it. It takes
~24 hours for this bug to show itself.

Let me know if you need any more info.

Paul



More information about the collectd mailing list