fix(stream): memory leak
This commit is contained in:
parent
c411b9aebb
commit
e30b74ad5a
|
@ -299,6 +299,10 @@ void vnodeApplyWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs) {
|
||||||
vnodePostBlockMsg(pVnode, pMsg);
|
vnodePostBlockMsg(pVnode, pMsg);
|
||||||
if (rsp.info.handle != NULL) {
|
if (rsp.info.handle != NULL) {
|
||||||
tmsgSendRsp(&rsp);
|
tmsgSendRsp(&rsp);
|
||||||
|
} else {
|
||||||
|
if (rsp.pCont) {
|
||||||
|
rpcFreeCont(rsp.pCont);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vGTrace("vgId:%d, msg:%p is freed, code:0x%x index:%" PRId64, vgId, pMsg, rsp.code, pMsg->info.conn.applyIndex);
|
vGTrace("vgId:%d, msg:%p is freed, code:0x%x index:%" PRId64, vgId, pMsg, rsp.code, pMsg->info.conn.applyIndex);
|
||||||
|
|
|
@ -65,7 +65,6 @@ int32_t tDecodeStreamDispatchReq(SDecoder* pDecoder, SStreamDispatchReq* pReq) {
|
||||||
void tFreeStreamDispatchReq(SStreamDispatchReq* pReq) {
|
void tFreeStreamDispatchReq(SStreamDispatchReq* pReq) {
|
||||||
taosArrayDestroyP(pReq->data, taosMemoryFree);
|
taosArrayDestroyP(pReq->data, taosMemoryFree);
|
||||||
taosArrayDestroy(pReq->dataLen);
|
taosArrayDestroy(pReq->dataLen);
|
||||||
taosMemoryFree(pReq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tEncodeStreamRetrieveReq(SEncoder* pEncoder, const SStreamRetrieveReq* pReq) {
|
int32_t tEncodeStreamRetrieveReq(SEncoder* pEncoder, const SStreamRetrieveReq* pReq) {
|
||||||
|
@ -285,7 +284,7 @@ int32_t streamDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pDat
|
||||||
}
|
}
|
||||||
code = 0;
|
code = 0;
|
||||||
FAIL_FIXED_DISPATCH:
|
FAIL_FIXED_DISPATCH:
|
||||||
taosArrayDestroy(req.data);
|
taosArrayDestroyP(req.data, taosMemoryFree);
|
||||||
taosArrayDestroy(req.dataLen);
|
taosArrayDestroy(req.dataLen);
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue