From a76bad8d1418c841c3f2c677cac276f35b9d77e9 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Thu, 11 Dec 2014 13:48:06 -0800 Subject: [PATCH] Fixed an incorrect revert on db/db_impl_readonly.cc Summary: Fixed an incorrect revert on db/db_impl_readonly.cc --- db/db_impl_readonly.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_impl_readonly.cc b/db/db_impl_readonly.cc index 2581d8453..018e1c3c5 100644 --- a/db/db_impl_readonly.cc +++ b/db/db_impl_readonly.cc @@ -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; }