summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf3523f)
raw | patch | inline | side by side (parent: cf3523f)
author | Florian Forster <octo@noris.net> | |
Tue, 6 Nov 2007 16:37:53 +0000 (16:37 +0000) | ||
committer | Florian Forster <octo@noris.net> | |
Tue, 6 Nov 2007 16:37:53 +0000 (16:37 +0000) |
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!
must mean that the snmp library takes care of this somehow. Man, I love well
documented libraries!
src/snmp.c | patch | blob | history |
diff --git a/src/snmp.c b/src/snmp.c
index 0989143e9f66ef30bbe0e9bb16f9d26715b7bc36..300647659a7e31b6b539abfe953e56c8ccaec73c 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
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;