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
This commit is contained in:
Yi Wu 2017-09-01 14:08:19 -07:00 committed by Facebook Github Bot
parent 37ae8cc60f
commit ab95e293d2

View File

@ -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;
}