From: Ruben Kerkhof Date: Sat, 5 Dec 2015 12:21:25 +0000 (+0100) Subject: varnish plugin: fix two resource leaks on error X-Git-Tag: collectd-5.5.1~25^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ce65e9a3072aff269b2caf29e7f1450a10882aba;p=collectd.git varnish plugin: fix two resource leaks on error CID #42774 Signed-off-by: Florian Forster --- diff --git a/src/varnish.c b/src/varnish.c index 3a8dddd7..bf248456 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -651,6 +651,7 @@ static int varnish_config_instance (const oconfig_item_t *ci) /* {{{ */ { WARNING ("Varnish plugin: \"Instance\" blocks accept only " "one argument."); + sfree (conf); return (EINVAL); } @@ -750,6 +751,7 @@ static int varnish_config_instance (const oconfig_item_t *ci) /* {{{ */ WARNING ("Varnish plugin: No metric has been configured for " "instance \"%s\". Disabling this instance.", (conf->instance == NULL) ? "localhost" : conf->instance); + sfree (conf); return (EINVAL); }