From fd0445383400a82f33159ec5f3b0209ce17e7d7b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 4 Aug 2009 11:05:02 +0200 Subject: [PATCH] src/utils_cache.c: Free the meta data when removing a cache entry. --- src/utils_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- 2.30.2