From b5dbc8439fd865e082665481839c56949eb40818 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 3 Jan 2023 20:35:26 +0800 Subject: [PATCH] fix mem leak --- source/libs/executor/src/tsort.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index b3f342c694..261ab2b2e8 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -121,10 +121,12 @@ void tsortClearOrderdSource(SArray* pOrderedSource) { if ((*pSource)->param && !(*pSource)->onlyRef) { taosMemoryFree((*pSource)->param); } - if ((*pSource)->src.pBlock) { + + if (!(*pSource)->onlyRef && (*pSource)->src.pBlock) { blockDataDestroy((*pSource)->src.pBlock); (*pSource)->src.pBlock = NULL; } + taosMemoryFreeClear(*pSource); } -- GitLab