summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84bf5e2)
raw | patch | inline | side by side (parent: 84bf5e2)
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
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 6ecdfafb327a4bf36604cedaa8aa155ef023602b..7caa625e6cb86704b215cb2fc0782a1525860122 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;