Fixed valgrind error in options_util_test
Summary: Fixed valgrind error in options_util_test by deleting the compaction_filter allocated from RandomInitCFOptions(). Test Plan: valgrind --error-exitcode=2 --leak-check=full ./options_util_test Reviewers: anthony, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D50661
This commit is contained in:
parent
6ce42dd075
commit
5ac16300b0
@ -80,6 +80,12 @@ TEST_F(OptionsUtilTest, SaveAndLoad) {
|
||||
ASSERT_NOK(RocksDBOptionsParser::VerifyCFOptions(
|
||||
cf_opts[i], loaded_cf_descs[i].options));
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < kCFCount; ++i) {
|
||||
if (cf_opts[i].compaction_filter) {
|
||||
delete cf_opts[i].compaction_filter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace rocksdb
|
||||
|
Loading…
Reference in New Issue
Block a user