Fix valgrind issues

Summary:
NewFixedPrefixTransform is leaked in default options. Broken by b47812fba6

Also included in the diff some code cleanup

Test Plan:
valgrind env_test
also make check

Reviewers: haobo, danguo, yhchiang

Reviewed By: danguo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D17211
This commit is contained in:
Igor Canadi
2014-03-27 08:22:59 -07:00
parent d556200264
commit 1c9f8f0884
4 changed files with 6 additions and 8 deletions

View File

@@ -32,9 +32,7 @@ Options::Options()
compaction_filter(nullptr),
compaction_filter_factory(std::shared_ptr<CompactionFilterFactory>(
new DefaultCompactionFilterFactory())),
compaction_filter_factory_v2(
new DefaultCompactionFilterFactoryV2(
NewFixedPrefixTransform(8))),
compaction_filter_factory_v2(new DefaultCompactionFilterFactoryV2()),
create_if_missing(false),
error_if_exists(false),
paranoid_checks(false),