diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index a33da175dc9bfb52b262628f350a77a785c19058..719d80aa775bf3b5abe3065ef7eca799d452e315 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;