Fixed an incorrect revert on db/db_impl_readonly.cc

Summary:
Fixed an incorrect revert on db/db_impl_readonly.cc
This commit is contained in:
Yueh-Hsuan Chiang 2014-12-11 13:48:06 -08:00
parent 9cda7cb77b
commit a76bad8d14

View File

@ -151,7 +151,9 @@ Status DB::OpenForReadOnly(
}
}
impl->mutex_.Unlock();
if (!s.ok()) {
if (s.ok()) {
*dbptr = impl;
} else {
for (auto h : *handles) {
delete h;
}