Fix memory leak on blob db open

Summary:
Fixes #2820
Closes https://github.com/facebook/rocksdb/pull/2826

Differential Revision: D5757527

Pulled By: yiwu-arbug

fbshipit-source-id: f495b63700495aeaade30a1da5e3675848f3d72f
main
Yi Wu 7 years ago committed by Facebook Github Bot
parent 37ae8cc60f
commit ab95e293d2
  1. 3
      utilities/blob_db/blob_db.cc

@ -142,16 +142,19 @@ Status BlobDB::Open(const DBOptions& db_options_input,
s = bdb->OpenPhase1();
if (!s.ok()) {
delete bdb;
return s;
}
if (no_base_db) {
*blob_db = bdb;
return s;
}
DB* db = nullptr;
s = DB::Open(db_options, dbname, column_families, handles, &db);
if (!s.ok()) {
delete bdb;
return s;
}

Loading…
Cancel
Save