]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix chained cache put if cache isn't initialized
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 16 Oct 2018 14:17:34 +0000 (07:17 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 8 Nov 2018 17:19:30 +0000 (09:19 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/services/svc_sys_obj_cache.h

index 71421131e4cce6103b7da4cac9a2eda59260dac3..7b986fe508969330a707631db0785f83778abc32 100644 (file)
@@ -138,6 +138,10 @@ public:
 
   bool put(RGWSI_SysObj_Cache *svc, const string& key, T *entry,
           std::initializer_list<rgw_cache_entry_info *> 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 */