From f4fb7286665343e5ab77ebebef45dd5df72f2c19 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Tue, 15 Oct 2024 16:12:12 -0700 Subject: [PATCH] revert move --- source/s3_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/s3_client.c b/source/s3_client.c index c40557c4..85066027 100644 --- a/source/s3_client.c +++ b/source/s3_client.c @@ -343,10 +343,6 @@ struct aws_s3_client *aws_s3_client_new( } } - if (aws_mutex_init(&client->synced_data.lock) != AWS_OP_SUCCESS) { - goto on_error; - } - client->buffer_pool = aws_s3_buffer_pool_new(allocator, part_size, mem_limit); if (client->buffer_pool == NULL) { @@ -368,6 +364,10 @@ struct aws_s3_client *aws_s3_client_new( aws_ref_count_init(&client->ref_count, client, (aws_simple_completion_callback *)s_s3_client_start_destroy); + if (aws_mutex_init(&client->synced_data.lock) != AWS_OP_SUCCESS) { + goto on_error; + } + aws_linked_list_init(&client->synced_data.pending_meta_request_work); aws_linked_list_init(&client->synced_data.prepared_requests);