From 327085b7b2ca72504800e023bab20c33ffa5474e Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Wed, 16 Nov 2016 12:02:39 -0800 Subject: [PATCH] fix valgrind Summary: Closes https://github.com/facebook/rocksdb/pull/1526 Differential Revision: D4191257 Pulled By: ajkr fbshipit-source-id: d09dc76 --- table/block_based_table_reader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/table/block_based_table_reader.cc b/table/block_based_table_reader.cc index 3d179ce83..1a6622158 100644 --- a/table/block_based_table_reader.cc +++ b/table/block_based_table_reader.cc @@ -1966,7 +1966,7 @@ Status BlockBasedTable::DumpTable(WritableFile* out_file) { return s; } // Output range deletions block - auto range_del_iter = NewRangeTombstoneIterator(ReadOptions()); + auto* range_del_iter = NewRangeTombstoneIterator(ReadOptions()); range_del_iter->SeekToFirst(); if (range_del_iter->Valid()) { out_file->Append( @@ -1978,6 +1978,7 @@ Status BlockBasedTable::DumpTable(WritableFile* out_file) { } out_file->Append("\n"); } + delete range_del_iter; // Output Data blocks s = DumpDataBlocks(out_file);