fix: (last) memleak in mergeLastCid

This commit is contained in:
Shungang Li 2024-08-23 16:58:05 +08:00
parent cf855cbff4
commit 23365f1cf6
1 changed files with 1 additions and 0 deletions

View File

@ -3162,6 +3162,7 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC
SLastCol lastCol = {.rowKey = rowKey.key, .colVal = *pColVal, .cacheStatus = TSDB_LAST_CACHE_VALID};
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _err);
tsdbCacheFreeSLastColItem(lastColVal);
taosArraySet(pColArray, iCol, &lastCol);
int32_t aColIndex = taosArraySearchIdx(aColArray, &lastCol.colVal.cid, compareInt16Val, TD_EQ);
if (aColIndex >= 0) {