Skip to content

Commit

Permalink
Fix SIGSEGV when not using cache
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcanadi committed Mar 13, 2015
1 parent e25ff03 commit 417367c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions db/db_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1423,8 +1423,10 @@ class Benchmark {
[](ColumnFamilyHandle* cfh) { delete cfh; });
delete db_.db;
delete prefix_extractor_;
// this will leak, but we're shutting down so nobody cares
cache_->DisownData();
if (cache_.get() != nullptr) {
// this will leak, but we're shutting down so nobody cares
cache_->DisownData();
}
}

Slice AllocateKey(std::unique_ptr<const char[]>* key_guard) {
Expand Down

0 comments on commit 417367c

Please sign in to comment.