fix: crash while set rpcinfo for db trans

This commit is contained in:
Shengliang Guan 2022-07-19 20:28:55 +08:00
parent 2c619652aa
commit bc6f452157
1 changed files with 3 additions and 3 deletions

View File

@ -710,9 +710,9 @@ int32_t mndSetRpcInfoForDbTrans(SMnode *pMnode, SRpcMsg *pMsg, EOperType oper, c
mDebug("trans:%d, db:%s oper:%d matched with input", pTrans->id, dbname, oper); mDebug("trans:%d, db:%s oper:%d matched with input", pTrans->id, dbname, oper);
if (pTrans->pRpcArray == NULL) { if (pTrans->pRpcArray == NULL) {
pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo)); pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo));
if (pTrans->pRpcArray != NULL && taosArrayPush(pTrans->pRpcArray, &pMsg->info) != NULL) { }
code = 0; if (pTrans->pRpcArray != NULL && taosArrayPush(pTrans->pRpcArray, &pMsg->info) != NULL) {
} code = 0;
} }
sdbRelease(pMnode->pSdb, pTrans); sdbRelease(pMnode->pSdb, pTrans);