From: Adam C. Emerson Date: Fri, 19 Jul 2019 20:10:30 +0000 (-0400) Subject: rgw: Move upload_info declaration out of conditional X-Git-Tag: v15.1.0~1931^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29559%2Fhead;p=ceph.git rgw: Move upload_info declaration out of conditional 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 --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index b5d909d74d0a..38861e68893b 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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) {