Skip to content

Commit

Permalink
fix coredump for release nullptr
Browse files Browse the repository at this point in the history
Summary:
Coredump will be triggered when ingest external sst file after delete range.
ref facebook#2398
Closes facebook#2463

Differential Revision: D5275599

Pulled By: ajkr

fbshipit-source-id: 0828dbc062ea8c74e913877cd63494fd3478a30d
  • Loading branch information
zhangjinpeng87 authored and facebook-github-bot committed Jun 19, 2017
1 parent 0d27845 commit c430d69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/table_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ InternalIterator* TableCache::NewRangeTombstoneIterator(
if (s.ok()) {
result = table_reader->NewRangeTombstoneIterator(options);
if (result != nullptr) {
result->RegisterCleanup(&UnrefEntry, cache_, handle);
if (handle != nullptr) {
result->RegisterCleanup(&UnrefEntry, cache_, handle);
}
}
}
if (result == nullptr && handle != nullptr) {
Expand Down

0 comments on commit c430d69

Please sign in to comment.