mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix the valgrind error in newly added unittests for table stats
Summary: Previous the newly added test called NewBloomFilter without releasing it at the end of the test, which resulted in memory leak and was detected by valgrind. Test Plan: Ran valgrind test.
This commit is contained in:
@@ -906,7 +906,10 @@ TEST(TableTest, FilterPolicyNameStats) {
|
||||
std::vector<std::string> keys;
|
||||
KVMap kvmap;
|
||||
Options options;
|
||||
options.filter_policy = NewBloomFilterPolicy(10);
|
||||
std::unique_ptr<const FilterPolicy> filter_policy(
|
||||
NewBloomFilterPolicy(10)
|
||||
);
|
||||
options.filter_policy = filter_policy.get();
|
||||
|
||||
c.Finish(options, &keys, &kvmap);
|
||||
auto& stats = c.table()->GetTableStats();
|
||||
|
||||
Reference in New Issue
Block a user