From 2067058a608be3bb070523f598d124deb39b18aa Mon Sep 17 00:00:00 2001 From: Manish Patil Date: Sun, 30 Nov 2014 19:00:31 -0800 Subject: [PATCH] Dump routine to BlockBasedTableReader (valgrind) Summary: Fixed valgrind issue Test Plan: valgrind check done Reviewers: rven, sdong Reviewed By: sdong Subscribers: sdong, dhruba Differential Revision: https://reviews.facebook.net/D30699 --- util/sst_dump_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/sst_dump_test.cc b/util/sst_dump_test.cc index 6b980ddb4..f3fa1664d 100644 --- a/util/sst_dump_test.cc +++ b/util/sst_dump_test.cc @@ -47,13 +47,13 @@ void createSST(const std::string& file_name, Options opts; const ImmutableCFOptions imoptions(opts); rocksdb::InternalKeyComparator ikc(opts.comparator); - TableBuilder* tb = nullptr; + unique_ptr tb; env->NewWritableFile(file_name, &file, env_options); opts.table_factory = tf; - tb = opts.table_factory->NewTableBuilder(imoptions, ikc, file.get(), - CompressionType::kNoCompression, - CompressionOptions()); + tb.reset(opts.table_factory->NewTableBuilder(imoptions, ikc, file.get(), + CompressionType::kNoCompression, + CompressionOptions())); // Populate slightly more than 1K keys uint32_t num_keys = 1024;