提交 c82a39f0 编写于 作者: D dapan1121

fix: fix taosd memory leak issue

上级 44bdb511
...@@ -40,7 +40,7 @@ int32_t schSwitchJobStatus(SSchJob* pJob, int32_t status, void* param) { ...@@ -40,7 +40,7 @@ int32_t schSwitchJobStatus(SSchJob* pJob, int32_t status, void* param) {
SCH_RET(schProcessOnJobFailure(pJob, (param ? *(int32_t*)param : 0))); SCH_RET(schProcessOnJobFailure(pJob, (param ? *(int32_t*)param : 0)));
break; break;
case JOB_TASK_STATUS_DROP: case JOB_TASK_STATUS_DROP:
SCH_ERR_JRET(schProcessOnJobDropped(pJob, *(int32_t*)param)); schProcessOnJobDropped(pJob, *(int32_t*)param);
if (taosRemoveRef(schMgmt.jobRef, pJob->refId)) { if (taosRemoveRef(schMgmt.jobRef, pJob->refId)) {
SCH_JOB_ELOG("remove job from job list failed, refId:0x%" PRIx64, pJob->refId); SCH_JOB_ELOG("remove job from job list failed, refId:0x%" PRIx64, pJob->refId);
......
...@@ -144,11 +144,9 @@ void schedulerFreeJob(int64_t* jobId, int32_t errCode) { ...@@ -144,11 +144,9 @@ void schedulerFreeJob(int64_t* jobId, int32_t errCode) {
return; return;
} }
if (schJobDone(pJob)) {
return;
}
schSwitchJobStatus(pJob, JOB_TASK_STATUS_DROP, (void*)&errCode); schSwitchJobStatus(pJob, JOB_TASK_STATUS_DROP, (void*)&errCode);
schReleaseJob(*jobId);
*jobId = 0; *jobId = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册