fix:memory leak
This commit is contained in:
parent
bb80866395
commit
93f71923d7
|
@ -181,6 +181,7 @@ typedef struct SResultColumn {
|
|||
|
||||
typedef struct SReqResultInfo {
|
||||
SExecResult execRes;
|
||||
const char* pRspMsg;
|
||||
const char* pData;
|
||||
TAOS_FIELD* fields; // todo, column names are not needed.
|
||||
TAOS_FIELD* userFields; // the fields info that return to user
|
||||
|
|
|
@ -363,6 +363,7 @@ void *createRequest(uint64_t connId, int32_t type, int64_t reqid) {
|
|||
}
|
||||
|
||||
void doFreeReqResultInfo(SReqResultInfo *pResInfo) {
|
||||
taosMemoryFreeClear(pResInfo->pRspMsg);
|
||||
taosMemoryFreeClear(pResInfo->length);
|
||||
taosMemoryFreeClear(pResInfo->row);
|
||||
taosMemoryFreeClear(pResInfo->pCol);
|
||||
|
|
|
@ -2186,6 +2186,8 @@ int32_t setQueryResultFromRsp(SReqResultInfo* pResultInfo, const SRetrieveTableR
|
|||
return TSDB_CODE_TSC_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
taosMemoryFreeClear(pResultInfo->pRspMsg);
|
||||
pResultInfo->pRspMsg = (const char*)pRsp;
|
||||
pResultInfo->pData = (void*)pRsp->data;
|
||||
pResultInfo->numOfRows = htobe64(pRsp->numOfRows);
|
||||
pResultInfo->current = 0;
|
||||
|
|
Loading…
Reference in New Issue