From cab48ced206dbd59871b6fabfaf20571a6fd9e3e Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 28 Nov 2022 21:40:46 +0800 Subject: [PATCH] fix(query): memory leak with pPageIdList on sort --- source/libs/executor/src/tsort.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index e0a0b9442e..244d403aa0 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -116,9 +116,12 @@ void tsortClearOrderdSource(SArray *pOrderedSource) { if (NULL == *pSource) { continue; } - + // release pageIdList + if ((*pSource)->pageIdList) { + taosArrayDestroy((*pSource)->pageIdList); + } if ((*pSource)->param && !(*pSource)->onlyRef) { - taosMemoryFree((*pSource)->param); + taosMemoryFree((*pSource)->param); } taosMemoryFreeClear(*pSource); } -- GitLab