Skip to content

Commit

Permalink
[SYS-1015] Allocate IOStreamWithOwnedBuf with Aws::New
Browse files Browse the repository at this point in the history
Summary: The factory needs to create the stream with Aws::New instead of new, as per https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/configuring-iostreams.html

Test Plan: make check

Reviewers: tudor, ngbronson, dhruba

Differential Revision: https://rockset.phacility.com/D13256
  • Loading branch information
igorcanadi committed Sep 13, 2021
1 parent fe08124 commit 772311c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloud/aws/aws_s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,8 @@ Status S3StorageProvider::DoGetCloudObject(const std::string& bucket_name,
Aws::Utils::ARRAY_ALLOCATION_TAG, destination,
std::ios_base::out | std::ios_base::trunc);
}
return new IOStreamWithOwnedBuf<WritableFileStreamBuf>(
return Aws::New<IOStreamWithOwnedBuf<WritableFileStreamBuf>>(
Aws::Utils::ARRAY_ALLOCATION_TAG,
std::unique_ptr<WritableFileStreamBuf>(new WritableFileStreamBuf(
std::unique_ptr<WritableFileWriter>(new WritableFileWriter(
std::move(file), destination, foptions)))));
Expand Down

0 comments on commit 772311c

Please sign in to comment.