projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git]
/
src
/
snmp.c
diff --git
a/src/snmp.c
b/src/snmp.c
index
33a76e3
..
ae41d03
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)
status = cf_util_get_string(ci, &hd->name);
if (status != 0)
+ {
+ sfree (hd);
return status;
return status;
+ }
hd->sess_handle = NULL;
hd->interval = 0;
hd->sess_handle = NULL;
hd->interval = 0;
@@
-1376,7
+1379,7
@@
static int csnmp_dispatch_table (host_definition_t *host, data_definition_t *dat
static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
{
struct snmp_pdu *req;
static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
{
struct snmp_pdu *req;
- struct snmp_pdu *res;
+ struct snmp_pdu *res
= NULL
;
struct variable_list *vb;
const data_set_t *ds;
struct variable_list *vb;
const data_set_t *ds;
@@
-1734,6
+1737,7
@@
static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
res = NULL;
sfree (errstr);
res = NULL;
sfree (errstr);
+ sfree (vl.values);
csnmp_host_close_session (host);
return (-1);
csnmp_host_close_session (host);
return (-1);