projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84bf5e2
)
snmp plugin: don't read from uninitialized pointer
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:31:16 +0000
(19:31 +0100)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Tue, 12 Jan 2016 06:55:01 +0000
(07:55 +0100)
if the first snmp_pdu_create inside the loop returns an error,
we exit the loop with res uninitialized and then call snmp_free_pdu on it.
CID #38037
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
6ecdfaf
..
7caa625
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-1194,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;
- struct snmp_pdu *res;
+ struct snmp_pdu *res
= NULL
;
struct variable_list *vb;
const data_set_t *ds;