From 7e91b86f4d0e9de9b4e83612f530e46abbd374ed Mon Sep 17 00:00:00 2001 From: Kai Liu Date: Mon, 28 Oct 2013 14:33:24 -0700 Subject: [PATCH] Fix a valgrind warning Summary: A latest valgrind test found a recently added unit test has memory leak, which is because DB is not closed at the end of the test. Test Plan: re-run the valgrind locally and make sure there's no memory leakage any more. Reviewers: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D13725 --- db/deletefile_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/deletefile_test.cc b/db/deletefile_test.cc index d169e4202..a864716cc 100644 --- a/db/deletefile_test.cc +++ b/db/deletefile_test.cc @@ -218,6 +218,7 @@ TEST(DeleteFileTest, DeleteLogFiles) { archived_log->PathName().c_str()); ASSERT_OK(db_->DeleteFile(archived_log->PathName())); ASSERT_TRUE(!env_->FileExists(dbname_ + "/" + archived_log->PathName())); + CloseDB(); } } //namespace rocksdb