fix: fix invalid free

This commit is contained in:
yihaoDeng 2023-02-21 23:00:57 +08:00
parent 4902e9a644
commit b8b2b8a23a
1 changed files with 2 additions and 0 deletions

View File

@ -985,6 +985,7 @@ _RETURN:
}
static void cliDestroyBatch(SCliBatch* pBatch) {
if (pBatch == NULL) return;
while (!QUEUE_IS_EMPTY(&pBatch->wq)) {
queue* h = QUEUE_HEAD(&pBatch->wq);
QUEUE_REMOVE(h);
@ -2310,6 +2311,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64());
STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx));
pCtx->epSet = *pEpSet;
pCtx->origEpSet = *pEpSet;
pCtx->ahandle = pReq->info.ahandle;
pCtx->msgType = pReq->msgType;