projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b392ea
)
varnish plugin: fix two resource leaks on error
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Dec 2015 12:21:25 +0000
(13:21 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 20:29:31 +0000
(21:29 +0100)
CID #42774
Signed-off-by: Florian Forster <octo@collectd.org>
src/varnish.c
patch
|
blob
|
history
diff --git
a/src/varnish.c
b/src/varnish.c
index
3a8dddd
..
bf24845
100644
(file)
--- 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);
}