From: Yehuda Sadeh Date: Tue, 16 Oct 2018 14:17:34 +0000 (-0700) Subject: rgw: fix chained cache put if cache isn't initialized X-Git-Tag: v14.1.0~965^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b6cfb3f34dc7db66070c80789b917f6d340d5aa1;p=ceph.git rgw: fix chained cache put if cache isn't initialized Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/services/svc_sys_obj_cache.h b/src/rgw/services/svc_sys_obj_cache.h index 71421131e4cc..7b986fe50896 100644 --- a/src/rgw/services/svc_sys_obj_cache.h +++ b/src/rgw/services/svc_sys_obj_cache.h @@ -138,6 +138,10 @@ public: bool put(RGWSI_SysObj_Cache *svc, const string& key, T *entry, std::initializer_list cache_info_entries) { + if (!svc) { + return false; + } + Entry chain_entry(this, key, entry); /* we need the svc cache to call us under its lock to maintain lock ordering */