From: Florian Forster Date: Fri, 10 Oct 2008 06:17:22 +0000 (+0200) Subject: src/utils_cache.c: Fix a serious memory leak. X-Git-Tag: collectd-4.4.4~8 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=b24d793d347f6f6c8b29e25758fa2d925fb7e011;hp=3c316743f0dccb70e49a10ed44951dd4b289d9f0;p=collectd.git src/utils_cache.c: Fix a serious memory leak. Whenever a data set went missing, the its name (the `key'; up to (5*64)+4 bytes) was not free'd. Thanks to Niraj Tolia for reporting this :) --- diff --git a/src/utils_cache.c b/src/utils_cache.c index 9f7e3b68..6d965169 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -299,6 +299,7 @@ int uc_check_timeout (void) ERROR ("uc_check_timeout: c_avl_remove (%s) failed.", keys[i]); } sfree (keys[i]); + sfree (key); cache_free (ce); } else if (status == 1) /* persist */