From e4199a62defae442067bc2031ca1dc0d0e14cc9c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 21 Apr 2023 10:37:50 +0800 Subject: [PATCH] fix(stream): fix memory leak. --- source/libs/executor/src/timewindowoperator.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index ef9dc779d9..be2bd0e6e2 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -2542,6 +2542,16 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) { while (1) { if (isTaskKilled(pTaskInfo)) { + + if (pInfo->pUpdated != NULL) { + pInfo->pUpdated = taosArrayDestroy(pInfo->pUpdated); + } + + if (pInfo->pUpdatedMap != NULL) { + tSimpleHashCleanup(pInfo->pUpdatedMap); + pInfo->pUpdatedMap = NULL; + } + T_LONG_JMP(pTaskInfo->env, pTaskInfo->code); } -- GitLab