]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Move upload_info declaration out of conditional 29898/head
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 19 Jul 2019 20:10:30 +0000 (16:10 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 26 Aug 2019 13:09:39 +0000 (15:09 +0200)
That way we don't deconstruct it right after assigning a reference to
part of it.

Fixes: https://tracker.ceph.com/issues/41172
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit a63881eaf7688ce0e5318de5d9847ec01a19f6d7)

src/rgw/rgw_op.cc

index 645a29f99c8a89e665838f6e76ba6ac32700ba5f..12eada3f31e4450e9d121769e88501ea920772ac 100644 (file)
@@ -3655,10 +3655,10 @@ void RGWPutObj::execute()
 
   rgw_placement_rule *pdest_placement;
 
+  multipart_upload_info upload_info;
   if (multipart) {
     RGWMPObj mp(s->object.name, multipart_upload_id);
 
-    multipart_upload_info upload_info;
     op_ret = get_multipart_info(store, s, mp.get_meta(), nullptr, nullptr, &upload_info);
     if (op_ret < 0) {
       if (op_ret != -ENOENT) {