]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
notify: fix a use-after-move crash, unconstify res_id
authorYuval Lifshitz <ylifshit@redhat.com>
Wed, 29 Dec 2021 17:27:43 +0000 (12:27 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Tue, 4 Jan 2022 14:26:26 +0000 (09:26 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_notify.cc
src/rgw/rgw_notify.h

index 0875987aa607fb200e0cd04eb519dc3f85632b40..e565f9872380490feecf0a255fb4ea548ce83b4a 100644 (file)
@@ -847,7 +847,7 @@ int publish_commit(rgw::sal::Object* obj,
       event_entry.push_endpoint = std::move(topic.cfg.dest.push_endpoint);
       event_entry.push_endpoint_args =
        std::move(topic.cfg.dest.push_endpoint_args);
-      event_entry.arn_topic = std::move(topic.cfg.dest.arn_topic);
+      event_entry.arn_topic = topic.cfg.dest.arn_topic;
       bufferlist bl;
       encode(event_entry, bl);
       const auto& queue_name = topic.cfg.dest.arn_topic;
index 6470e26783388557d7418ecda2af289de450effd..44e16f751efbf69a294fd513574c17e98870cb93 100644 (file)
@@ -44,7 +44,7 @@ int remove_persistent_topic(const std::string& topic_name, optional_yield y);
 struct reservation_t {
   struct topic_t {
     topic_t(const std::string& _configurationId, const rgw_pubsub_topic& _cfg,
-           const cls_2pc_reservation::id_t _res_id) :
+           cls_2pc_reservation::id_t _res_id) :
       configurationId(_configurationId), cfg(_cfg), res_id(_res_id) {}
 
     std::string configurationId;