]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Move upload_info declaration out of conditional 29559/head
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 19 Jul 2019 20:10:30 +0000 (16:10 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Thu, 8 Aug 2019 17:12:46 +0000 (13:12 -0400)
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>
src/rgw/rgw_op.cc

index b5d909d74d0a4ec24ff37f9ff47f79308e558e2f..38861e68893bc2f4e03b2c0e020c559b379624bc 100644 (file)
@@ -3788,10 +3788,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) {