From 32d8837bd22654314740c002618e7b05ae8e3c43 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 17 Jul 2020 11:19:08 +0800 Subject: [PATCH] [TD-948] --- src/common/src/tdataformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index a33da175dc..719d80aa77 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -318,7 +318,7 @@ SDataCols *tdNewDataCols(int maxRowSize, int maxCols, int maxRows) { pCols->maxPoints = maxRows; pCols->bufSize = maxRowSize * maxRows; - pCols->buf = calloc(pCols->bufSize); + pCols->buf = calloc(1, pCols->bufSize); if (pCols->buf == NULL) { free(pCols); return NULL; -- GitLab