diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index 7e79a618a8..24916bf47c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -1020,7 +1020,10 @@ int32_t tsdbFSCreateRefSnapshotWithoutLock(STFileSystem *fs, TFileSetArray **fse if (code) break; code = TARRAY2_APPEND(fsetArr[0], fset1); - if (code) break; + if (code) { + tsdbTFileSetClear(&fset1); + break; + } } if (code) { @@ -1219,4 +1222,4 @@ int32_t tsdbFinishTaskOnFileSet(STsdb *tsdb, int32_t fid) { } return 0; -} \ No newline at end of file +}