diff --git a/source/libs/executor/src/exchangeoperator.c b/source/libs/executor/src/exchangeoperator.c index 5f53b43802..355db10337 100644 --- a/source/libs/executor/src/exchangeoperator.c +++ b/source/libs/executor/src/exchangeoperator.c @@ -347,10 +347,13 @@ static int32_t initExchangeOperator(SExchangePhysiNode* pExNode, SExchangeInfo* return TSDB_CODE_INVALID_PARA; } pInfo->pFetchRpcHandles = taosArrayInit(numOfSources, sizeof(int64_t)); - (void)taosArrayReserve(pInfo->pFetchRpcHandles, numOfSources); if (!pInfo->pFetchRpcHandles) { return terrno; } + void* ret = taosArrayReserve(pInfo->pFetchRpcHandles, numOfSources); + if (!ret) { + return terrno; + } pInfo->pSources = taosArrayInit(numOfSources, sizeof(SDownstreamSourceNode)); if (pInfo->pSources == NULL) {