Fix DBOptionsTest.GetLatestOptions

Summary: RandomInitCFOptions will allocate a new compaction filter, which we have to delete afterward.

Test Plan: valgrind against the test

Reviewers: IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D64011
main
Yi Wu 8 years ago
parent 40cfa3e021
commit 8d9bf5c498
  1. 4
      db/db_options_test.cc

@ -47,7 +47,9 @@ class DBOptionsTest : public DBTestBase {
Options options;
test::RandomInitCFOptions(&options, rnd);
auto sanitized_options = SanitizeOptions(options, nullptr, options);
return GetMutableCFOptionsMap(sanitized_options);
auto opt_map = GetMutableCFOptionsMap(sanitized_options);
delete options.compaction_filter;
return opt_map;
}
#endif // ROCKSDB_LITE
};

Loading…
Cancel
Save