From b822d971ccb7ea8adbbc134f0c40fe90de9357c5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 25 Aug 2021 20:24:43 +0800 Subject: [PATCH] [td-255] fix invalid free error. --- src/client/src/tscServer.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 19efa229af..d36a3124db 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -367,8 +367,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) { SSqlObj* pSql = (SSqlObj*)taosAcquireRef(tscObjRef, handle); if (pSql == NULL) { rpcFreeCont(rpcMsg->pCont); - free(rpcMsg); - free(pEpSet); return; } @@ -386,8 +384,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) { taosRemoveRef(tscObjRef, handle); taosReleaseRef(tscObjRef, handle); rpcFreeCont(rpcMsg->pCont); - free(rpcMsg); - free(pEpSet); return; } @@ -399,8 +395,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) { taosRemoveRef(tscObjRef, handle); taosReleaseRef(tscObjRef, handle); rpcFreeCont(rpcMsg->pCont); - free(rpcMsg); - free(pEpSet); return; } @@ -454,8 +448,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) { if (rpcMsg->code == TSDB_CODE_TSC_ACTION_IN_PROGRESS) { taosReleaseRef(tscObjRef, handle); rpcFreeCont(rpcMsg->pCont); - free(rpcMsg); - free(pEpSet); return; } } @@ -539,8 +531,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) { taosReleaseRef(tscObjRef, handle); rpcFreeCont(rpcMsg->pCont); - free(rpcMsg); - free(pEpSet); } int doBuildAndSendMsg(SSqlObj *pSql) { -- GitLab