From d5072a8f323899edfb763ab397bfe6f59a67cfbc Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Fri, 12 Aug 2022 11:36:49 +0800 Subject: [PATCH] fix: fix sched handler memory leak issue --- source/libs/index/src/index.c | 1 + source/util/src/ttimer.c | 1 + 2 files changed, 2 insertions(+) diff --git a/source/libs/index/src/index.c b/source/libs/index/src/index.c index eac585c2e6..be64a8b44d 100644 --- a/source/libs/index/src/index.c +++ b/source/libs/index/src/index.c @@ -68,6 +68,7 @@ void indexInit() { void indexCleanup() { // refacto later taosCleanUpScheduler(indexQhandle); + taosMemoryFreeClear(indexQhandle); taosCloseRef(indexRefMgt); } diff --git a/source/util/src/ttimer.c b/source/util/src/ttimer.c index ff5ac1b217..3a868c7f97 100644 --- a/source/util/src/ttimer.c +++ b/source/util/src/ttimer.c @@ -606,6 +606,7 @@ void taosTmrCleanUp(void* handle) { taosUninitTimer(); taosCleanUpScheduler(tmrQhandle); + taosMemoryFreeClear(tmrQhandle); for (int32_t i = 0; i < tListLen(wheels); i++) { time_wheel_t* wheel = wheels + i; -- GitLab