void RGWGetObjLayout::execute()
{
rgw_obj obj(s->bucket, s->object);
- target = new RGWRados::Object(store, s->bucket_info, *static_cast<RGWObjectCtx *>(s->obj_ctx), rgw_obj(s->bucket, s->object));
- RGWRados::Object::Read stat_op(target);
+ RGWRados::Object target(store,
+ s->bucket_info,
+ *static_cast<RGWObjectCtx *>(s->obj_ctx),
+ rgw_obj(s->bucket, s->object));
+ RGWRados::Object::Read stat_op(&target);
op_ret = stat_op.prepare();
if (op_ret < 0) {
head_obj = stat_op.state.head_obj;
- op_ret = target->get_manifest(&manifest);
+ op_ret = target.get_manifest(&manifest);
}
class RGWGetObjLayout : public RGWOp {
protected:
- RGWRados::Object *target{nullptr};
RGWObjManifest *manifest{nullptr};
rgw_raw_obj head_obj;
public:
RGWGetObjLayout() {
- delete target;
}
int check_caps(RGWUserCaps& caps) {