From 6a69ca987e1c3774428c9ab2778624ee80f343c6 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 4 Dec 2015 21:22:42 +0100 Subject: [PATCH] table plugin: fix check for realloc We were checking the wrong thing. CID #38024 Signed-off-by: Florian Forster --- src/table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))); -- 2.30.2