From 320c5067a10237b05e3eb1d1dcb1041fa07869bb Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:32:36 +0200 Subject: [PATCH] zone plugin: plug leak on error [src/zone.c:124]: (error) Memory leak: ret --- src/zone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zone.c b/src/zone.c index 52dc5539..0e9fee38 100644 --- a/src/zone.c +++ b/src/zone.c @@ -121,6 +121,7 @@ zone_find_stats(c_avl_tree_t *tree, zoneid_t zoneid) } if (!(key = malloc(sizeof(*key)))) { WARNING("zone plugin: no memory"); + free(ret); return(NULL); } *key = zoneid; -- 2.30.2