From: Ruben Kerkhof Date: Sat, 5 Dec 2015 11:11:26 +0000 (+0100) Subject: write_riemann plugin: plug leak on error X-Git-Tag: collectd-5.5.1~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c43dde3e19870ae4ecdb93e6e80979ea40f5c130;p=collectd.git write_riemann plugin: plug leak on error CID #37996 Signed-off-by: Florian Forster --- diff --git a/src/write_riemann.c b/src/write_riemann.c index a09c7236..328341ea 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -1051,6 +1051,7 @@ static int riemann_config(oconfig_item_t *ci) /* {{{ */ } if ((val = strdup(child->values[1].value.string)) == NULL) { WARNING("cannot allocate memory for attribute value."); + sfree (key); return (-1); } strarray_add(&riemann_attrs, &riemann_attrs_num, key);