From b8b2b8a23aaad0250f45a70855c194c2d7db4bab Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 21 Feb 2023 23:00:57 +0800 Subject: [PATCH] fix: fix invalid free --- source/libs/transport/src/transCli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 9e74825a1f..5d6751a260 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -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; -- GitLab