fix(stream): check return value.

This commit is contained in:
Haojun Liao 2024-07-23 11:32:21 +08:00
parent 5f9f6310a4
commit 0d131116e7
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ int32_t doKillCheckpointTrans(SMnode *pMnode, const char *pDBName, size_t len) {
SStreamObj *pStream = NULL;
int32_t code = mndGetStreamObj(pMnode, pTransInfo->streamId, &pStream);
if (pStream != NULL || code != 0) {
if (pStream != NULL && code == 0) {
if (identicalName(pStream->sourceDb, pDBName, len)) {
mndKillTransImpl(pMnode, pTransInfo->transId, pStream->sourceDb);
} else if (identicalName(pStream->targetDb, pDBName, len)) {