set ptr to null after free

This commit is contained in:
xsren 2024-09-06 15:34:23 +08:00
parent dce4c5dc48
commit b991e233e9
1 changed files with 1 additions and 2 deletions

View File

@ -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));
}