projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3b53b4
)
snmp plugin: plug leak in error path.
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 27 Nov 2015 21:14:08 +0000
(22:14 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 28 Nov 2015 06:50:45 +0000
(07:50 +0100)
Partial back port of #1368.
Signed-off-by: Florian Forster <octo@collectd.org>
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
33a76e3
..
3d66041
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-656,7
+656,10
@@
static int csnmp_config_add_host (oconfig_item_t *ci)
status = cf_util_get_string(ci, &hd->name);
if (status != 0)
+ {
+ sfree (hd);
return status;
+ }
hd->sess_handle = NULL;
hd->interval = 0;