fix(stream): fix memory leak.

This commit is contained in:
Haojun Liao 2025-02-24 13:48:21 +08:00
parent ea549364d4
commit 4d21d5e055
1 changed files with 2 additions and 0 deletions

View File

@ -1298,6 +1298,8 @@ static int32_t mndProcessStreamCheckpoint(SRpcMsg *pReq) {
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
taosArrayDestroy(pLongChkpts);
while ((pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream)) != NULL) { while ((pIter = sdbFetch(pSdb, SDB_STREAM, pIter, (void **)&pStream)) != NULL) {
int64_t duration = now - pStream->checkpointFreq; int64_t duration = now - pStream->checkpointFreq;
if (duration < tsStreamCheckpointInterval * 1000) { if (duration < tsStreamCheckpointInterval * 1000) {