From: Ruben Kerkhof Date: Fri, 4 Dec 2015 20:22:42 +0000 (+0100) Subject: table plugin: fix check for realloc X-Git-Tag: collectd-5.5.1~31^2~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6a69ca987e1c3774428c9ab2778624ee80f343c6;p=collectd.git table plugin: fix check for realloc We were checking the wrong thing. CID #38024 Signed-off-by: Florian Forster --- diff --git a/src/table.c b/src/table.c index a3bacc7a..745ec135 100644 --- 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)));