fix: invalid code
This commit is contained in:
parent
5057f3cd75
commit
a67e46efc8
|
@ -309,11 +309,12 @@ static int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pRpc, EQueueType q
|
||||||
if (pVnode == NULL) return -1;
|
if (pVnode == NULL) return -1;
|
||||||
|
|
||||||
SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM);
|
SRpcMsg *pMsg = taosAllocateQitem(sizeof(SRpcMsg), RPC_QITEM);
|
||||||
int32_t code = -1;
|
int32_t code = 0;
|
||||||
|
|
||||||
if (pMsg == NULL) {
|
if (pMsg == NULL) {
|
||||||
rpcFreeCont(pRpc->pCont);
|
rpcFreeCont(pRpc->pCont);
|
||||||
pRpc->pCont = NULL;
|
pRpc->pCont = NULL;
|
||||||
|
code = -1;
|
||||||
} else {
|
} else {
|
||||||
memcpy(pMsg, pRpc, sizeof(SRpcMsg));
|
memcpy(pMsg, pRpc, sizeof(SRpcMsg));
|
||||||
switch (qtype) {
|
switch (qtype) {
|
||||||
|
@ -342,6 +343,7 @@ static int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pRpc, EQueueType q
|
||||||
taosWriteQitem(pVnode->pSyncQ, pMsg);
|
taosWriteQitem(pVnode->pSyncQ, pMsg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
code = -1;
|
||||||
terrno = TSDB_CODE_INVALID_PARA;
|
terrno = TSDB_CODE_INVALID_PARA;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue