From bd9d85916278a23e37ce2f6cee60d5f7e56c9144 Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Wed, 13 Nov 2024 09:45:57 +0800 Subject: [PATCH] fix ci error. --- source/libs/wal/src/walMgmt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/wal/src/walMgmt.c b/source/libs/wal/src/walMgmt.c index 12d9b170fb..edf702b948 100644 --- a/source/libs/wal/src/walMgmt.c +++ b/source/libs/wal/src/walMgmt.c @@ -122,6 +122,10 @@ int32_t walInitWriteFileForSkip(SWal *pWal) { } pWal->writeCur = 0; _exit: + if (code != TSDB_CODE_SUCCESS) { + if (pIdxTFile) (void)taosCloseFile(&pIdxTFile); + if (pLogTFile) (void)taosCloseFile(&pLogTFile); + } (void)taosCloseFile(&pIdxTFile); (void)taosCloseFile(&pLogTFile); TAOS_RETURN(code);