Fix SIGSEGV when not using cache

main
Igor Canadi 10 years ago
parent e25ff039c8
commit 417367c42d
  1. 6
      db/db_bench.cc

@ -1423,8 +1423,10 @@ class Benchmark {
[](ColumnFamilyHandle* cfh) { delete cfh; }); [](ColumnFamilyHandle* cfh) { delete cfh; });
delete db_.db; delete db_.db;
delete prefix_extractor_; delete prefix_extractor_;
// this will leak, but we're shutting down so nobody cares if (cache_.get() != nullptr) {
cache_->DisownData(); // this will leak, but we're shutting down so nobody cares
cache_->DisownData();
}
} }
Slice AllocateKey(std::unique_ptr<const char[]>* key_guard) { Slice AllocateKey(std::unique_ptr<const char[]>* key_guard) {

Loading…
Cancel
Save