diff --git a/utilities/blob_db/blob_db.cc b/utilities/blob_db/blob_db.cc index 4f95b61f28..947840751e 100644 --- a/utilities/blob_db/blob_db.cc +++ b/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; }