Merge pull request #27438 from taosdata/fix/TD-31504-3.0-1
fix: (last) memleak in mergeLastCid
This commit is contained in:
commit
c8f88a4c06
|
@ -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};
|
SLastCol lastCol = {.rowKey = rowKey.key, .colVal = *pColVal, .cacheStatus = TSDB_LAST_CACHE_VALID};
|
||||||
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _err);
|
TAOS_CHECK_GOTO(tsdbCacheReallocSLastCol(&lastCol, NULL), &lino, _err);
|
||||||
|
|
||||||
|
tsdbCacheFreeSLastColItem(lastColVal);
|
||||||
taosArraySet(pColArray, iCol, &lastCol);
|
taosArraySet(pColArray, iCol, &lastCol);
|
||||||
int32_t aColIndex = taosArraySearchIdx(aColArray, &lastCol.colVal.cid, compareInt16Val, TD_EQ);
|
int32_t aColIndex = taosArraySearchIdx(aColArray, &lastCol.colVal.cid, compareInt16Val, TD_EQ);
|
||||||
if (aColIndex >= 0) {
|
if (aColIndex >= 0) {
|
||||||
|
|
Loading…
Reference in New Issue