From b991e233e9dcd5ac80a0814e81b95b4f0a5b2dd1 Mon Sep 17 00:00:00 2001 From: xsren <285808407@qq.com> Date: Fri, 6 Sep 2024 15:34:23 +0800 Subject: [PATCH] set ptr to null after free --- source/libs/scheduler/src/schRemote.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c index e733c83d24..bf88248259 100644 --- a/source/libs/scheduler/src/schRemote.c +++ b/source/libs/scheduler/src/schRemote.c @@ -444,7 +444,6 @@ _return: int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDataBuf *pMsg, int32_t rspCode) { int32_t code = 0; int32_t msgType = pMsg->msgType; - char *msg = pMsg->pData; bool dropExecNode = (msgType == TDMT_SCH_LINK_BROKEN || SCH_NETWORK_ERR(rspCode)); if (SCH_IS_QUERY_JOB(pJob)) { @@ -466,7 +465,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa _return: - taosMemoryFreeClear(msg); + taosMemoryFreeClear(pMsg->pData); SCH_RET(schProcessOnTaskFailure(pJob, pTask, code)); }