diff --git a/src/snmp.c b/src/snmp.c
index ad81c89214a926d8e194bad96d2dd207bf6fa707..7d340d18c2398a8a26fb845d7b0e03352b53f903 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
@@ -1316,6 +1316,8 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
snmp_free_pdu (res);
res = NULL;
+ /* snmp_synch_response already freed our PDU */
+ req = NULL;
sfree (errstr);
csnmp_host_close_session (host);
@@ -1437,6 +1439,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);