From b641906ca7c4652e5234dce65ca43dd875f3a7ae Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 6 Nov 2007 16:37:53 +0000 Subject: [PATCH] snmp plugin: Don't try to free the request PDU - it segfaults for some reason. According to other code I've seen this is never done by anyone else, so this must mean that the snmp library takes care of this somehow. Man, I love well documented libraries! --- src/snmp.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/snmp.c b/src/snmp.c index 0989143e..30064765 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -837,10 +837,6 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data) res = NULL; status = snmp_sess_synch_response (host->sess_handle, req, &res); - if (req != NULL) - snmp_free_pdu (req); - req = NULL; - if ((status != STAT_SUCCESS) || (res == NULL)) { char *errstr = NULL; @@ -1104,10 +1100,6 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data) ERROR ("snmp plugin: host %s: snmp_sess_synch_response failed: %s", host->name, (errstr == NULL) ? "Unknown problem" : errstr); - if (req != NULL) - snmp_free_pdu (req); - req = NULL; - if (res != NULL) snmp_free_pdu (res); res = NULL; @@ -1135,10 +1127,6 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data) vl.values[i] = csnmp_value_list_to_value (vb, ds->ds[i].type); } /* for (res->variables) */ - if (req != NULL) - snmp_free_pdu (req); - req = NULL; - if (res != NULL) snmp_free_pdu (res); res = NULL; -- 2.11.0