File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ static struct aws_s3_upload_request_checksum_context *s_s3_upload_request_checks
3333
3434 aws_ref_count_init (& context -> ref_count , context , s_aws_s3_upload_request_checksum_context_destroy );
3535 context -> allocator = allocator ;
36+ if (aws_mutex_init (& context -> synced_data .lock )) {
37+ aws_s3_upload_request_checksum_context_release (context );
38+ return NULL ;
39+ }
3640 /* Handle case where no checksum config is provided */
3741 if (!checksum_config || checksum_config -> checksum_algorithm == AWS_SCA_NONE ) {
3842 context -> algorithm = AWS_SCA_NONE ;
@@ -53,10 +57,6 @@ static struct aws_s3_upload_request_checksum_context *s_s3_upload_request_checks
5357 return NULL ;
5458 }
5559 context -> encoded_checksum_size = encoded_size ;
56- if (!aws_mutex_init (& context -> synced_data .lock )) {
57- aws_s3_upload_request_checksum_context_release (context );
58- return NULL ;
59- }
6060 return context ;
6161}
6262
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ static int s_set_post_chunk_stream(struct aws_chunk_stream *parent_stream) {
7070 }
7171 }
7272 struct aws_byte_cursor checksum_result_cursor =
73- aws_s3_upload_request_checksum_context_get_checksum_cursor (& parent_stream -> checksum_context );
73+ aws_s3_upload_request_checksum_context_get_checksum_cursor (parent_stream -> checksum_context );
7474 AWS_ASSERT (parent_stream -> checksum_context -> encoded_checksum_size == checksum_result_cursor .len );
7575
7676 if (aws_byte_buf_init (
You can’t perform that action at this time.
0 commit comments