diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 099f01e9a708377b076895d3d472d653b977fc56..47efc29031b972818fbc540150613b61c0b199c5 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1528,6 +1528,11 @@ void handleDownstreamOperator(SSqlObj** pSqlObjList, int32_t numOfUpstream, SQue tscDebug("0x%"PRIx64" create QInfo 0x%"PRIx64" to execute the main query while all nest queries are ready", pSql->self, pSql->self); px->pQInfo = createQInfoFromQueryNode(px, &tableGroupInfo, pSourceOperator, NULL, NULL, MASTER_SCAN, pSql->self); + if (px->pQInfo == NULL) { + tscAsyncResultOnError(pSql); + pOutput->code = TSDB_CODE_QRY_OUT_OF_MEMORY; + return; + } px->pQInfo->runtimeEnv.udfIsCopy = true; px->pQInfo->runtimeEnv.pUdfInfo = pUdfInfo;