cache/var-data: realloc for cache reading

This commit is contained in:
Minglei Jin 2023-05-26 15:01:57 +08:00
parent 6e29d7879f
commit 34b9b322cd
1 changed files with 3 additions and 1 deletions

View File

@ -790,7 +790,9 @@ static int32_t tsdbCacheLoadFromRocks(STsdb *pTsdb, tb_uid_t uid, SArray *pLastA
code = -1;
}
taosArraySet(pLastArray, idxKey->idx, pLastCol);
SLastCol lastCol = *pLastCol;
reallocVarData(&lastCol.colVal);
taosArraySet(pLastArray, idxKey->idx, &lastCol);
taosArrayRemove(remainCols, j);
taosMemoryFree(values_list[i]);