Fix nullptr dereference in adaptive_table
Summary: @dulmarod Ran infer on RocksDB and found that we dereference nullptr in adaptive_table https://fb.facebook.com/groups/rocksdb/permalink/1046374415411173/ Test Plan: make check -j64 Reviewers: sdong, yhchiang, andrewkr Reviewed By: andrewkr Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D56973
This commit is contained in:
parent
9385fd72c0
commit
6356b4d516
@ -78,25 +78,25 @@ std::string AdaptiveTableFactory::GetPrintableTableOptions() const {
|
||||
const int kBufferSize = 200;
|
||||
char buffer[kBufferSize];
|
||||
|
||||
if (!table_factory_to_write_) {
|
||||
if (table_factory_to_write_) {
|
||||
snprintf(buffer, kBufferSize, " write factory (%s) options:\n%s\n",
|
||||
table_factory_to_write_->Name(),
|
||||
table_factory_to_write_->GetPrintableTableOptions().c_str());
|
||||
ret.append(buffer);
|
||||
}
|
||||
if (!plain_table_factory_) {
|
||||
if (plain_table_factory_) {
|
||||
snprintf(buffer, kBufferSize, " %s options:\n%s\n",
|
||||
plain_table_factory_->Name(),
|
||||
plain_table_factory_->GetPrintableTableOptions().c_str());
|
||||
ret.append(buffer);
|
||||
}
|
||||
if (!block_based_table_factory_) {
|
||||
if (block_based_table_factory_) {
|
||||
snprintf(buffer, kBufferSize, " %s options:\n%s\n",
|
||||
block_based_table_factory_->Name(),
|
||||
block_based_table_factory_->GetPrintableTableOptions().c_str());
|
||||
ret.append(buffer);
|
||||
}
|
||||
if (!cuckoo_table_factory_) {
|
||||
if (cuckoo_table_factory_) {
|
||||
snprintf(buffer, kBufferSize, " %s options:\n%s\n",
|
||||
cuckoo_table_factory_->Name(),
|
||||
cuckoo_table_factory_->GetPrintableTableOptions().c_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user