diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index aa4df032e85042e9a4d98081881dfc7bf49f96c8..5b0a233e13a37dc403cb4d9445977e19b037eabd 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -147,9 +147,11 @@ void tsdbCloseRepo(TSDB_REPO_T *repo, int toCommit) { if (toCommit) { tsdbAsyncCommit(pRepo); if (pRepo->commit) pthread_join(pRepo->commitThread, NULL); - } else { - // TODO } + tsdbUnRefMemTable(pRepo, pRepo->mem); + tsdbUnRefMemTable(pRepo, pRepo->imem); + pRepo->mem = NULL; + pRepo->imem = NULL; tsdbCloseFileH(pRepo); tsdbCloseBufPool(pRepo);