From ce65e9a3072aff269b2caf29e7f1450a10882aba Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 13:21:25 +0100 Subject: [PATCH] varnish plugin: fix two resource leaks on error CID #42774 Signed-off-by: Florian Forster --- src/varnish.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.30.2