projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged branch 'collectd-4.10' into collectd-5.4.
[collectd.git]
/
src
/
snmp.c
diff --git
a/src/snmp.c
b/src/snmp.c
index
858d44c
..
7caa625
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-771,8
+771,7
@@
static value_t csnmp_value_list_to_value (struct variable_list *vl, int type,
tmp_unsigned = (uint32_t) *vl->val.integer;
tmp_signed = (int32_t) *vl->val.integer;
tmp_unsigned = (uint32_t) *vl->val.integer;
tmp_signed = (int32_t) *vl->val.integer;
- if ((vl->type == ASN_INTEGER)
- || (vl->type == ASN_GAUGE))
+ if (vl->type == ASN_INTEGER)
prefer_signed = 1;
DEBUG ("snmp plugin: Parsed int32 value is %"PRIu64".", tmp_unsigned);
prefer_signed = 1;
DEBUG ("snmp plugin: Parsed int32 value is %"PRIu64".", tmp_unsigned);
@@
-1195,7
+1194,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;
@@
-1488,7
+1487,7
@@
static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
if (host->sess_handle == NULL)
{
if (host->sess_handle == NULL)
{
- DEBUG ("snmp plugin: csnmp_read_
tabl
e: host->sess_handle == NULL");
+ DEBUG ("snmp plugin: csnmp_read_
valu
e: host->sess_handle == NULL");
return (-1);
}
return (-1);
}
@@
-1552,6
+1551,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);