diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index b362f1d10402393f891f589c3b94edbae22b140c..e262a3ad385273f6e7f4b3c2cbe9c075e3d4e86d 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -353,6 +353,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co qDebug("QInfo:%p has more results to retrieve", pQInfo); } + // the memory should be freed if the code of pQInfo is not TSDB_CODE_SUCCESS if (pQInfo->code != TSDB_CODE_SUCCESS) { rpcFreeCont(*pRsp); *pRsp = NULL;