projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27a47fc
)
table plugin: fix check for realloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 20:22:42 +0000
(21:22 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 07:49:47 +0000
(08:49 +0100)
We were checking the wrong thing.
CID #38024
Signed-off-by: Florian Forster <octo@collectd.org>
src/table.c
patch
|
blob
|
history
diff --git
a/src/table.c
b/src/table.c
index
a3bacc7
..
745ec13
100644
(file)
--- a/
src/table.c
+++ b/
src/table.c
@@
-183,7
+183,7
@@
static int tbl_config_result (tbl_t *tbl, oconfig_item_t *ci)
res = (tbl_result_t *)realloc (tbl->results,
(tbl->results_num + 1) * sizeof (*tbl->results));
- if (
NULL == tbl
) {
+ if (
res == NULL
) {
char errbuf[1024];
log_err ("realloc failed: %s.",
sstrerror (errno, errbuf, sizeof (errbuf)));