fix: taos array init issue
This commit is contained in:
parent
2eec17b20c
commit
66245a54f0
|
@ -2825,7 +2825,7 @@ int32_t ctgLaunchGetTbMetasTask(SCtgTask* pTask) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
pTask->msgCtxs = taosArrayInit_s(pCtx->fetchNum, sizeof(SCtgMsgCtx));
|
pTask->msgCtxs = taosArrayInit_s(sizeof(SCtgMsgCtx), pCtx->fetchNum);
|
||||||
if (NULL == pTask->msgCtxs) {
|
if (NULL == pTask->msgCtxs) {
|
||||||
ctgError("taosArrayInit_s %d SCtgMsgCtx %d failed", pCtx->fetchNum, (int32_t)sizeof(SCtgMsgCtx));
|
ctgError("taosArrayInit_s %d SCtgMsgCtx %d failed", pCtx->fetchNum, (int32_t)sizeof(SCtgMsgCtx));
|
||||||
CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
CTG_ERR_RET(TSDB_CODE_OUT_OF_MEMORY);
|
||||||
|
|
|
@ -1653,11 +1653,13 @@ int32_t ctgCloneDbCfgInfo(void* pSrc, SDbCfgInfo** ppDst) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
TAOS_MEMCPY(pDst, pSrc, sizeof(SDbCfgInfo));
|
TAOS_MEMCPY(pDst, pSrc, sizeof(SDbCfgInfo));
|
||||||
|
if (((SDbCfgInfo *)pSrc)->pRetensions) {
|
||||||
pDst->pRetensions = taosArrayDup(((SDbCfgInfo *)pSrc)->pRetensions, NULL);
|
pDst->pRetensions = taosArrayDup(((SDbCfgInfo *)pSrc)->pRetensions, NULL);
|
||||||
if (NULL == pDst->pRetensions) {
|
if (NULL == pDst->pRetensions) {
|
||||||
taosMemoryFree(pDst);
|
taosMemoryFree(pDst);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*ppDst = pDst;
|
*ppDst = pDst;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue