X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fsnmp.c;h=3ccf60c3fd8ff638ab90aaa21f8eafcbb5223261;hb=70ea9457f76d6cd953f2cbd64eeda0ff265f47db;hp=0717365a9694de0c402dbe7f12dfae8ff705431e;hpb=aa958d2ad30d29553e489bc727254a8eedb4ea17;p=collectd.git diff --git a/src/snmp.c b/src/snmp.c index 0717365a..3ccf60c3 100644 --- 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; @@ -1755,6 +1755,7 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data) res = NULL; sfree (errstr); + sfree (vl.values); csnmp_host_close_session (host); return (-1);