]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: check for no-bucket at bucket_lc_process() preamble 56535/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 27 Mar 2024 22:33:56 +0000 (18:33 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 27 Mar 2024 22:33:56 +0000 (18:33 -0400)
Avoids trivial segfault deferencing the bucket pointer.

Fixes: https://tracker.ceph.com/issues/65188
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_lc.cc

index deb74465600b2588621a5ec750915f1c048d2d88..1d73463b70989542453ad02ee7c787879855f050 100644 (file)
@@ -2104,7 +2104,7 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker,
   }
 
   /* do nothing if no bucket */
-  if (entry->get_bucket().empty()) {
+  if ((! entry) || entry->get_bucket().empty()) {
     return ret;
   }