summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e96afed)
raw | patch | inline | side by side (parent: e96afed)
| 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
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 0717365a9694de0c402dbe7f12dfae8ff705431e..8df7edd40a2e173abd3bceb065ecaf0cda4e7d77 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;