diff --git a/source/libs/command/src/explain.c b/source/libs/command/src/explain.c index 2bfed58dc8..6a3df7be72 100644 --- a/source/libs/command/src/explain.c +++ b/source/libs/command/src/explain.c @@ -123,6 +123,7 @@ int32_t qExplainInitCtx(SExplainCtx **pCtx, SHashObj *groupHash, bool verbose, d SExplainCtx *ctx = taosMemoryCalloc(1, sizeof(SExplainCtx)); if (NULL == ctx) { qError("calloc SExplainCtx failed"); + QRY_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); goto _return; } @@ -1971,6 +1972,7 @@ int32_t qExplainGetRspFromCtx(void *ctx, SRetrieveTableRsp **pRsp) { SRetrieveTableRsp *rsp = (SRetrieveTableRsp *)taosMemoryCalloc(1, rspSize); if (NULL == rsp) { qError("malloc SRetrieveTableRsp failed, size:%d", rspSize); + QRY_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); goto _return; }