Skip to content

Commit

Permalink
Merge pull request #47906 from ivancich/wip-bad-move-s3-getobj
Browse files Browse the repository at this point in the history
rgw: fix bug where variable referenced after data moved out

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
  • Loading branch information
ivancich committed Sep 3, 2022
2 parents 1aac56e + 6038511 commit 929e96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rgw/rgw_rest_s3.cc
Expand Up @@ -614,8 +614,8 @@ int RGWGetObj_ObjStore_S3::override_range_hdr(const rgw::auth::StrategyRegistry&
std::string key = "HTTP_";
key.append(*k);
boost::replace_all(key, "-", "_");
ldpp_dout(this, 10) << "after splitting cache kv key: " << key << " " << *v << dendl;
rgw_env->set(std::move(key), std::string(*v));
ldpp_dout(this, 10) << "after splitting cache kv key: " << key << " " << rgw_env->get(key.c_str()) << dendl;
}
ret = RGWOp::verify_requester(auth_registry, y);
if(!ret && backup_range) {
Expand Down

0 comments on commit 929e96f

Please sign in to comment.