fix exchangeoperator ret check

This commit is contained in:
wangjiaming0909 2024-08-07 09:33:11 +08:00
parent 8c1f51c9e3
commit 2b8115d308
1 changed files with 4 additions and 1 deletions

View File

@ -347,10 +347,13 @@ static int32_t initExchangeOperator(SExchangePhysiNode* pExNode, SExchangeInfo*
return TSDB_CODE_INVALID_PARA; return TSDB_CODE_INVALID_PARA;
} }
pInfo->pFetchRpcHandles = taosArrayInit(numOfSources, sizeof(int64_t)); pInfo->pFetchRpcHandles = taosArrayInit(numOfSources, sizeof(int64_t));
(void)taosArrayReserve(pInfo->pFetchRpcHandles, numOfSources);
if (!pInfo->pFetchRpcHandles) { if (!pInfo->pFetchRpcHandles) {
return terrno; return terrno;
} }
void* ret = taosArrayReserve(pInfo->pFetchRpcHandles, numOfSources);
if (!ret) {
return terrno;
}
pInfo->pSources = taosArrayInit(numOfSources, sizeof(SDownstreamSourceNode)); pInfo->pSources = taosArrayInit(numOfSources, sizeof(SDownstreamSourceNode));
if (pInfo->pSources == NULL) { if (pInfo->pSources == NULL) {