From 07a3680812bfecc1498e56b91a692663adb5b779 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 30 Dec 2021 10:28:01 +0800 Subject: [PATCH] [td-11818] refactor. --- source/client/src/clientMsgHandler.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index f30a0d10d7..f4cec5c627 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -160,8 +160,9 @@ int32_t processRetrieveMnodeRsp(void* param, const SDataBuf* pMsg, int32_t code) assert(pMsg->len >= sizeof(SRetrieveTableRsp)); SRequestObj* pRequest = param; - tfree(pRequest->body.resInfo.pRspMsg); + SReqResultInfo* pResInfo = &pRequest->body.resInfo; + tfree(pResInfo->pRspMsg); if (code != TSDB_CODE_SUCCESS) { pRequest->code = code; terrno = code; @@ -169,14 +170,10 @@ int32_t processRetrieveMnodeRsp(void* param, const SDataBuf* pMsg, int32_t code) return code; } - pRequest->body.resInfo.pRspMsg = pMsg->pData; - SRetrieveTableRsp *pRetrieve = (SRetrieveTableRsp *) pMsg->pData; pRetrieve->numOfRows = htonl(pRetrieve->numOfRows); pRetrieve->precision = htons(pRetrieve->precision); - SReqResultInfo* pResInfo = &pRequest->body.resInfo; - pResInfo->pRspMsg = pMsg->pData; pResInfo->numOfRows = pRetrieve->numOfRows; pResInfo->pData = pRetrieve->data;