Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input stream ref #159

Merged
merged 6 commits into from
Apr 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions source/signable_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <aws/auth/signable.h>
#include <aws/common/string.h>
#include <aws/io/stream.h>

/*
* This is a simple aws_signable wrapper implementation for an s3 chunk
Expand Down Expand Up @@ -65,7 +66,7 @@ static void s_aws_signable_chunk_destroy(struct aws_signable *signable) {
if (impl == NULL) {
return;
}

aws_input_stream_release(impl->chunk_data);
aws_string_destroy(impl->previous_signature);

aws_mem_release(signable->allocator, signable);
Expand Down Expand Up @@ -99,7 +100,7 @@ struct aws_signable *aws_signable_new_chunk(
signable->vtable = &s_signable_chunk_vtable;
signable->impl = impl;

impl->chunk_data = chunk_data;
impl->chunk_data = aws_input_stream_acquire(chunk_data);
impl->previous_signature = aws_string_new_from_array(allocator, previous_signature.ptr, previous_signature.len);
if (impl->previous_signature == NULL) {
goto on_error;
Expand Down