From 3f642fd0135801ea1e9c8dc344836d8e831e5563 Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 27 Dec 2024 12:01:07 +0800 Subject: [PATCH] fix: unlock and error code of tlog --- source/util/src/tlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 88eccfaffd..4df5b322a2 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -673,11 +673,11 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) { } _exit: - taosUnLockLogFile(tsLogObj.logHandle->pFile); if (code != 0) { + taosUnLockLogFile(tsLogObj.logHandle->pFile); TAOS_UNUSED(printf("failed to init normal log file:%s at line %d, reason:%s\n", name, lino, tstrerror(code))); } - return 0; + return code; } static void taosUpdateLogNums(ELogLevel level) {