From df6ec3afc255dc652f0bd155f53028452ce69d28 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 21 Jan 2025 11:21:53 +0800 Subject: [PATCH] fix(stream): check null ptr. --- source/dnode/mnode/impl/src/mndStreamUtil.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStreamUtil.c b/source/dnode/mnode/impl/src/mndStreamUtil.c index 0bef4af47e..e3b8289e4c 100644 --- a/source/dnode/mnode/impl/src/mndStreamUtil.c +++ b/source/dnode/mnode/impl/src/mndStreamUtil.c @@ -709,13 +709,13 @@ static int32_t allTasksSendChkptReport(SChkptReportInfo* pReportInfo, int32_t nu } else { // do nothing } - } - - if (pTransInfo->transId != transId) { - mError("stream:0x%" PRIx64 - " checkpoint-report list info are expired, active transId:%d trans in list:%d, recheck next time", - id.streamId, pTransInfo->transId, transId); - return -1; + } else { + if (pTransInfo->transId != transId) { + mError("stream:0x%" PRIx64 + " checkpoint-report list info are expired, active transId:%d trans in list:%d, recheck next time", + id.streamId, pTransInfo->transId, transId); + return -1; + } } mDebug("stream:0x%" PRIx64 " %s all %d tasks send checkpoint-report, start to update checkpoint-info", id.streamId,