From d7ae6fb427da90910784dc81cde664810ad5e9de Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Fri, 13 Feb 2026 15:29:58 -0500 Subject: [PATCH] posixdriver: can move buffer::list leaving scope Signed-off-by: Matt Benjamin --- src/rgw/driver/posix/rgw_sal_posix.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index 461beef03353..fa135b82b2e6 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.cc +++ b/src/rgw/driver/posix/rgw_sal_posix.cc @@ -4062,15 +4062,17 @@ int POSIXMultipartUpload::complete(const DoutPrefixProvider *dpp, attrs[RGW_ATTR_COMPRESSION] = tmp; } - POSIXManifest manifest; - manifest.multipart_part_count = total_parts; - buffer::list manifest_bl; - manifest.encode(manifest_bl); - attrs[RGW_POSIX_ATTR_MANIFEST] = manifest_bl; + { + POSIXManifest manifest; + manifest.multipart_part_count = total_parts; + buffer::list manifest_bl; + manifest.encode(manifest_bl); + attrs[RGW_POSIX_ATTR_MANIFEST] = std::move(manifest_bl); - ret = shadow->merge_and_store_attrs(dpp, attrs, y); - if (ret < 0) { - return ret; + ret = shadow->merge_and_store_attrs(dpp, attrs, y); + if (ret < 0) { + return ret; + } } // Rename to target_obj -- 2.47.3