This is purely for code maintainability.
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
http_auth = NULL;
local_source = false;
- aws4_auth = NULL;
-
obj_ctx = NULL;
}
delete formatter;
delete bucket_acl;
delete object_acl;
- delete aws4_auth;
}
struct str_len {
/* aws4 auth support */
bool aws4_auth_needs_complete;
- rgw_aws4_auth *aws4_auth;
+ unique_ptr<rgw_aws4_auth> aws4_auth;
string canned_acl;
bool has_acl_header;
string algorithm = "AWS4-HMAC-SHA256";
try {
- s->aws4_auth = new rgw_aws4_auth;
+ s->aws4_auth = std::unique_ptr<rgw_aws4_auth>(new rgw_aws4_auth);
} catch (std::bad_alloc&) {
return -ENOMEM;
}