fix mem leak

This commit is contained in:
yihaoDeng 2022-11-29 21:59:49 +08:00
parent 6eb032f3e9
commit 9278ed2ab5
2 changed files with 10 additions and 5 deletions

View File

@ -146,7 +146,7 @@ typedef struct SSchedulerMgmt {
bool exit;
int32_t jobRef;
int32_t jobNum;
SSchStat stat;
SSchStat stat;
void *timer;
SRWLatch hbLock;
SHashObj *hbConnections;
@ -214,9 +214,9 @@ typedef struct SSchRedirectCtx {
} SSchRedirectCtx;
typedef struct SSchTimerParam {
int64_t rId;
uint64_t queryId;
uint64_t taskId;
int64_t rId;
uint64_t queryId;
uint64_t taskId;
} SSchTimerParam;
typedef struct SSchTask {

View File

@ -1152,7 +1152,12 @@ void schHandleTimerEvent(void *param, void *tmrId) {
SSchJob *pJob = NULL;
int32_t code = 0;
if (schProcessOnCbBegin(&pJob, &pTask, pTimerParam->queryId, pTimerParam->rId, pTimerParam->taskId)) {
int64_t rId = pTimerParam->rId;
uint64_t queryId = pTimerParam->queryId;
uint64_t taskId = pTimerParam->taskId;
taosMemoryFree(pTimerParam);
if (schProcessOnCbBegin(&pJob, &pTask, queryId, rId, taskId)) {
return;
}