From 5948ddd6971368d79fc3cd8417fdd6bc1c6528c6 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 23 Apr 2022 00:13:09 +0800 Subject: [PATCH] fix: invalid free in unittest --- source/dnode/mgmt/implement/src/dmExec.c | 1 + source/dnode/mgmt/interface/src/dmEnv.c | 1 + source/dnode/mgmt/mgmt_vnode/src/vmInt.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/mgmt/implement/src/dmExec.c b/source/dnode/mgmt/implement/src/dmExec.c index c0b85ed705..06001028b5 100644 --- a/source/dnode/mgmt/implement/src/dmExec.c +++ b/source/dnode/mgmt/implement/src/dmExec.c @@ -174,6 +174,7 @@ void dmStopNode(SMgmtWrapper *pWrapper) { void dmCloseNode(SMgmtWrapper *pWrapper) { dInfo("node:%s, start to close", pWrapper->name); + pWrapper->deployed = false; while (pWrapper->refCount > 0) { taosMsleep(10); diff --git a/source/dnode/mgmt/interface/src/dmEnv.c b/source/dnode/mgmt/interface/src/dmEnv.c index b6f309ec6f..92a6e018cb 100644 --- a/source/dnode/mgmt/interface/src/dmEnv.c +++ b/source/dnode/mgmt/interface/src/dmEnv.c @@ -53,6 +53,7 @@ void dmCleanup() { } monCleanup(); + syncCleanUp(); walCleanUp(); taosStopCacheRefreshWorker(); dInfo("dnode env is cleaned up"); diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index ffbc6eb3b9..e784272581 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -274,7 +274,7 @@ static void vmCleanup(SMgmtWrapper *pWrapper) { taosMemoryFree(pMgmt); pWrapper->pMgmt = NULL; - syncCleanUp(); + // syncCleanUp(); dInfo("vnode-mgmt is cleaned up"); } -- GitLab