From 2b8115d3081ac121c1c3b3328ea59dde42c62ab9 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Wed, 7 Aug 2024 09:33:11 +0800 Subject: [PATCH] fix exchangeoperator ret check --- source/libs/executor/src/exchangeoperator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {