diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index 4bb6f07a471efe60d735b17132faacb8bfb5ee31..a5fd3fca35c01b84f0b2c5b7cc4fe3b7bbf76662 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -126,10 +126,11 @@ static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal) { return -1; } SWalCkHead* lastEntry = (SWalCkHead*)found; + int64_t retVer = lastEntry->head.version; taosCloseFile(&pFile); taosMemoryFree(buf); - return lastEntry->head.version; + return retVer; } int walCheckAndRepairMeta(SWal* pWal) {