From: Florian Forster Date: Tue, 4 Aug 2009 09:05:02 +0000 (+0200) Subject: src/utils_cache.c: Free the meta data when removing a cache entry. X-Git-Tag: collectd-4.8.0~59 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=fd0445383400a82f33159ec5f3b0209ce17e7d7b;p=collectd.git src/utils_cache.c: Free the meta data when removing a cache entry. --- diff --git a/src/utils_cache.c b/src/utils_cache.c index 3577ac6f..91a60f0d 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -98,6 +98,7 @@ static cache_entry_t *cache_alloc (int values_num) ce->history = NULL; ce->history_length = 0; + ce->meta = NULL; return (ce); } /* cache_entry_t *cache_alloc */ @@ -110,6 +111,11 @@ static void cache_free (cache_entry_t *ce) sfree (ce->values_gauge); sfree (ce->values_raw); sfree (ce->history); + if (ce->meta != NULL) + { + meta_data_destroy (ce->meta); + ce->meta = NULL; + } sfree (ce); } /* void cache_free */