From 254ca811caf5d07299451b812eca1097493ad1f8 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Sun, 16 Sep 2018 02:50:03 -0700 Subject: [PATCH] rgw: chained cache doesn't init if not caching Signed-off-by: Yehuda Sadeh --- src/rgw/services/svc_sys_obj_cache.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/services/svc_sys_obj_cache.h b/src/rgw/services/svc_sys_obj_cache.h index f16ef4fa8db..a7110607c28 100644 --- a/src/rgw/services/svc_sys_obj_cache.h +++ b/src/rgw/services/svc_sys_obj_cache.h @@ -107,6 +107,9 @@ public: RGWChainedCacheImpl() : lock("RGWChainedCacheImpl::lock") {} void init(RGWSI_SysObj_Cache *svc) { + if (!svc) { + return; + } svc->register_chained_cache(this); expiry = std::chrono::seconds(svc->ctx()->_conf.get_val( "rgw_cache_expiry_interval")); -- 2.39.5