While configuring bucket sync policy, in "rgw_sync_bucket_entities::set_bucket()",
there could be a case where in bucket doesnt contain any value but is still being
dereferenced. This commit fixes the same.
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
(cherry picked from commit
86cf8275224536a7ca77eaf8a6e59951b3f25261)
bucket.emplace();
}
+ if (!bucket) {
+ return;
+ }
+
set_bucket_field(tenant, &bucket->tenant);
set_bucket_field(bucket_name, &bucket->name);
set_bucket_field(bucket_id, &bucket->bucket_id);