From 5d522982cd8483848b0ea7bcd6df954aa02198fd Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 17 Jul 2020 02:30:50 +0000 Subject: [PATCH] [TD-948] Conditional jump or move depends on uninitialised value --- 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 12ea4ad78d..a33da175dc 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 = malloc(pCols->bufSize); + pCols->buf = calloc(pCols->bufSize); if (pCols->buf == NULL) { free(pCols); return NULL; -- GitLab