From 53720052eddb240889f7fd152596129e98c9aaf8 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 29 Apr 2022 21:48:28 +0800 Subject: [PATCH] fix: invalid write in multi-process mode --- source/dnode/mgmt/implement/src/dmExec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dnode/mgmt/implement/src/dmExec.c b/source/dnode/mgmt/implement/src/dmExec.c index bb0206d229..06001028b5 100644 --- a/source/dnode/mgmt/implement/src/dmExec.c +++ b/source/dnode/mgmt/implement/src/dmExec.c @@ -192,15 +192,15 @@ void dmCloseNode(SMgmtWrapper *pWrapper) { dmStopNode(pWrapper); + taosWLockLatch(&pWrapper->latch); + (*pWrapper->fp.closeFp)(pWrapper); + taosWUnLockLatch(&pWrapper->latch); + if (pWrapper->procObj) { taosProcCleanup(pWrapper->procObj); pWrapper->procObj = NULL; } - taosWLockLatch(&pWrapper->latch); - (*pWrapper->fp.closeFp)(pWrapper); - taosWUnLockLatch(&pWrapper->latch); - dInfo("node:%s, has been closed", pWrapper->name); } -- GitLab