From b6aa3f962dc2b33fffa2262006963b7719aea88e Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 25 Sep 2015 12:07:32 -0700 Subject: [PATCH] Fixed a memory leak issue in DBTest.UnremovableSingleDelete Summary: Fixed a memory leak issue in DBTest.UnremovableSingleDelete Test Plan: valgrind --error-exitcode=2 --leak-check=full ./db_test --gtest_filter="*UnremovableSingleDelete*" Reviewers: sdong, anthony, IslamAbdelRahman, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D47583 --- db/db_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/db_test.cc b/db/db_test.cc index f02835fa8..68cdb874d 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -3691,6 +3691,7 @@ TEST_F(DBTest, UnremovableSingleDelete) { ASSERT_EQ("first", Get(1, "foo", snapshot)); ASSERT_EQ("NOT_FOUND", Get(1, "foo")); + db_->ReleaseSnapshot(snapshot); // Skip HashCuckooRep as it does not support single delete. FIFO and // universal compaction do not apply to the test case. Skip MergePut // because single delete does not get removed when it encounters a merge.