projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f41db5
)
snmp plugin: res can't be NULL here
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
8b21907
..
0e2af3b
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);