snmp: avoid freeing req under normal operation
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 19 Nov 2014 16:54:09 +0000 (17:54 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 19 Nov 2014 16:54:09 +0000 (17:54 +0100)
Equivalent patch to 79e90bba5, to avoid issue #804 introduced while
fixing #610.

src/snmp.c

index dacdede..8ab2bf8 100644 (file)
@@ -1377,6 +1377,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);