From cb75e5a863dd10b75aff6d645db8f58b86a26e36 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 20 May 2023 22:07:04 +0800 Subject: [PATCH] fix(stream): fix memory leak. --- source/libs/stream/src/streamDispatch.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index 1473345730..722013115f 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -421,12 +421,10 @@ int32_t streamDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pDat qDebug("s-task:%s (child taskId:%d) fix-dispatch blocks:%d to down stream s-task:%d in vgId:%d", pTask->id.idStr, pTask->selfChildId, numOfBlocks, downstreamTaskId, vgId); - if (doSendDispatchMsg(pTask, &req, vgId, pEpSet) < 0) { - taosArrayDestroyP(req.data, taosMemoryFree); - taosArrayDestroy(req.dataLen); - return code; - } - + code = doSendDispatchMsg(pTask, &req, vgId, pEpSet); + taosArrayDestroyP(req.data, taosMemoryFree); + taosArrayDestroy(req.dataLen); + return code; } else if (pTask->outputType == TASK_OUTPUT__SHUFFLE_DISPATCH) { int32_t rspCnt = atomic_load_32(&pTask->shuffleDispatcher.waitingRspCnt); ASSERT(rspCnt == 0); -- GitLab