diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index c96c916a0132bd715a559a76824f49b752b81ab1..16c96bb16f4b1315820550baf734074b92103e30 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -371,6 +371,11 @@ int tdInitDataCols(SDataCols *pCols, STSchema *pSchema) { pCols->cols = (SDataCol *)realloc(pCols->cols, sizeof(SDataCol) * pCols->maxCols); if (pCols->cols == NULL) return -1; } + for(i = 0; i < pCols->maxCols; i++) { + tfree(pCols->cols[i].pData); + pCols->cols[i].dataOff = NULL; + pCols->cols[i].spaceSize = 0; + } if (schemaTLen(pSchema) > pCols->maxRowSize) { pCols->maxRowSize = schemaTLen(pSchema);