snmp plugin: plug leak in error path.
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 27 Nov 2015 21:14:08 +0000 (22:14 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 28 Nov 2015 06:49:08 +0000 (07:49 +0100)
Partial back port of #1368.

Signed-off-by: Florian Forster <octo@collectd.org>
src/snmp.c

index acbdca0..6ecdfaf 100644 (file)
@@ -1551,6 +1551,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);