From 8455c2452e0249631dbb12b9902cfdb2e61f11e7 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 20 Jan 2009 13:24:54 +0100 Subject: [PATCH] utils_cache: Free then unused memory before returning in an error condition. --- src/utils_cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils_cache.c b/src/utils_cache.c index 6779bba8..79384121 100644 --- a/src/utils_cache.c +++ b/src/utils_cache.c @@ -187,6 +187,7 @@ static int uc_insert (const data_set_t *ds, const value_list_t *vl, ce = cache_alloc (ds->ds_num); if (ce == NULL) { + sfree (key_copy); ERROR ("uc_insert: cache_alloc (%i) failed.", ds->ds_num); return (-1); } -- 2.30.2