From: Ruben Kerkhof Date: Sat, 23 Apr 2016 08:32:36 +0000 (+0200) Subject: zone plugin: plug leak on error X-Git-Tag: collectd-5.6.0~329^2~42 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=320c5067a10237b05e3eb1d1dcb1041fa07869bb;p=collectd.git zone plugin: plug leak on error [src/zone.c:124]: (error) Memory leak: ret --- 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;