From: Florian Forster Date: Fri, 19 Jun 2015 08:54:02 +0000 (+0200) Subject: utils_cache plugin: Fix memory leak. X-Git-Tag: collectd-5.5.1~68^2~24 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e3d1da97ee6b6543ddfdfaff15d88b3750aa2047;p=collectd.git utils_cache plugin: Fix memory leak. --- diff --git a/src/utils_cache.c b/src/utils_cache.c index dc0ff0df..7eae1c7e 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -636,12 +636,13 @@ int uc_get_names (char ***ret_names, cdtime_t **ret_times, size_t *ret_number) if (status != 0) { size_t i; - + for (i = 0; i < number; i++) { sfree (names[i]); } sfree (names); + sfree (times); return (-1); }