fix mem leak
This commit is contained in:
parent
ddf7dcc94f
commit
d14a599a32
|
@ -357,15 +357,13 @@ static int32_t mndProcessHeartBeatReq(SMnodeMsg *pReq) {
|
|||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < sz; i++) {
|
||||
SClientHbReq* pHbReq = taosArrayGet(pArray, i);
|
||||
tFreeClientHbReq(pHbReq);
|
||||
}
|
||||
taosArrayDestroy(pArray);
|
||||
taosArrayDestroyEx(pArray, tFreeClientHbReq);
|
||||
|
||||
int32_t tlen = tSerializeSClientHbBatchRsp(NULL, &batchRsp);
|
||||
void* buf = rpcMallocCont(tlen);
|
||||
void* abuf = buf;
|
||||
tSerializeSClientHbBatchRsp(&abuf, &batchRsp);
|
||||
taosArrayDestroy(batchRsp.rsps);
|
||||
pReq->contLen = tlen;
|
||||
pReq->pCont = buf;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue