]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_main.cc: fix null-deref in case get_storage() fails 3978/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 5 Mar 2015 04:26:48 +0000 (05:26 +0100)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Mar 2015 09:38:10 +0000 (17:38 +0800)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 921c08fce503e171199f8f8b9208dcdf75ac41c4)

src/rgw/rgw_main.cc

index 727a8adf507785f9fc694857c477b293deaa99fe..26200adc190c59852810072b5ccc3daedaf526a0 100644 (file)
@@ -1045,10 +1045,9 @@ int main(int argc, const char **argv)
   RGWRados *store = RGWStoreManager::get_storage(g_ceph_context, true, true);
   if (!store) {
     derr << "Couldn't init storage provider (RADOS)" << dendl;
-    r = EIO;
+    return EIO;
   }
-  if (!r)
-    r = rgw_perf_start(g_ceph_context);
+  r = rgw_perf_start(g_ceph_context);
 
   rgw_rest_init(g_ceph_context, store->region);