summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f41db5)
raw | patch | inline | side by side (parent: 4f41db5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 09:07:38 +0000 (11:07 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 09:07:38 +0000 (11:07 +0200) |
[src/snmp.c:1761] -> [src/snmp.c:1777]: (warning) Either the condition 'res!=0' is redundant or there is possible null pointer dereference: res.
src/snmp.c | patch | blob | history |
diff --git a/src/snmp.c b/src/snmp.c
index 8b21907a031070df3e011b06c2bdc2a565e4575f..0e2af3beab6a5c94c30b3096ef940b5abdbd7152 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
@@ -1774,9 +1774,7 @@ static int csnmp_read_value (host_definition_t *host, data_definition_t *data)
data->scale, data->shift, host->name, data->name);
} /* for (res->variables) */
- if (res != NULL)
- snmp_free_pdu (res);
- res = NULL;
+ snmp_free_pdu (res);
DEBUG ("snmp plugin: -> plugin_dispatch_values (&vl);");
plugin_dispatch_values (&vl);