summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 497f578)
raw | patch | inline | side by side (parent: 497f578)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 8 Aug 2014 13:55:10 +0000 (15:55 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 8 Aug 2014 13:55:10 +0000 (15:55 +0200) |
This should fix the leak reported in issue #610.
src/snmp.c | patch | blob | history |
diff --git a/src/snmp.c b/src/snmp.c
index d440f7fee48ccf09797e0d6bf20d6e41c2db6c06..dacdedea5bdd060ded6d5d6e893f44f88996314a 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
@@ -1503,6 +1503,10 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
snmp_free_pdu (res);
res = NULL;
+ if (req != NULL)
+ snmp_free_pdu (req);
+ req = NULL;
+
if (status == 0)
csnmp_dispatch_table (host, data, instance_list_head, value_list_head);