提交 97bd6a9f 编写于 作者: L Liu Jicong

[TD-5694]<fix>: fix memory alloc

上级 2062b768
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册