From 6aa09f4d8f3ad83f135747a363c073f1a9390012 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Wed, 17 Apr 2024 13:55:06 +0800 Subject: [PATCH] fix cancel create tsma memory use after free --- source/client/src/clientEnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 6c20813118..7f73aa6845 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -538,7 +538,6 @@ void stopAllQueries(SRequestObj *pRequest) { pTmp = acquireRequest(tmpRefId); if (pTmp) { pReqList[++reqIdx] = pTmp; - releaseRequest(tmpRefId); } else { tscError("prev req ref 0x%" PRIx64 " is not there", tmpRefId); break; @@ -547,6 +546,7 @@ void stopAllQueries(SRequestObj *pRequest) { for (int32_t i = reqIdx; i >= 0; i--) { taosStopQueryImpl(pReqList[i]); + releaseRequest(pReqList[i]->self); } taosStopQueryImpl(pRequest);