From c43dde3e19870ae4ecdb93e6e80979ea40f5c130 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 12:11:26 +0100 Subject: [PATCH] write_riemann plugin: plug leak on error CID #37996 Signed-off-by: Florian Forster --- src/write_riemann.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.11.0