snmp plugin: Style fix
[collectd.git] / src / snmp.c
index 6e26ad5..68a3381 100644 (file)
@@ -1363,8 +1363,11 @@ static int csnmp_read_table(host_definition_t *host, data_definition_t *data) {
     }
 
     res = NULL;
-    /* snmp_sess_synch_response always frees our req PDU */
     status = snmp_sess_synch_response(host->sess_handle, req, &res);
+
+    /* snmp_sess_synch_response always frees our req PDU */
+    req = NULL;
+
     if ((status != STAT_SUCCESS) || (res == NULL)) {
       char *errstr = NULL;