Skip to content

Commit d6c8171

Browse files
authored
Merge pull request ceph#56591 from tchaikov/wip-unittest_rocksdb_option-fix-leak
tests: unittest_rocksdb_option: do not leak RocksDBStore Reviewed-by: Igor Fedotov <[email protected]>
2 parents d37aa58 + fd5b00d commit d6c8171

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/objectstore/TestRocksdbOptionParse.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ TEST(RocksDBOption, simple) {
1414
rocksdb::Options options;
1515
rocksdb::Status status;
1616
map<string,string> kvoptions;
17-
RocksDBStore *db = new RocksDBStore(g_ceph_context, dir, kvoptions, NULL);
17+
auto db = std::make_unique<RocksDBStore>(g_ceph_context, dir, kvoptions, nullptr);
1818
string options_string = ""
1919
"write_buffer_size=536870912;"
2020
"create_if_missing=true;"
@@ -48,7 +48,7 @@ TEST(RocksDBOption, interpret) {
4848
rocksdb::Options options;
4949
rocksdb::Status status;
5050
map<string,string> kvoptions;
51-
RocksDBStore *db = new RocksDBStore(g_ceph_context, dir, kvoptions, NULL);
51+
auto db = std::make_unique<RocksDBStore>(g_ceph_context, dir, kvoptions, nullptr);
5252
string options_string = "compact_on_mount = true; compaction_threads=10;flusher_threads=5;";
5353

5454
int r = db->ParseOptionsFromString(options_string, options);

0 commit comments

Comments
 (0)