projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e96afed
)
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
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 18:31:16 +0000
(19:31 +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
0717365
..
8df7edd
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-1398,7
+1398,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;