Skip to content

Commit

Permalink
use mem_calloc for socket
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Oct 10, 2024
1 parent 4cda6e1 commit ff93ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/channel_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ static void s_attempt_connection(struct aws_task *task, void *arg, enum aws_task
goto task_cancelled;
}

struct aws_socket *outgoing_socket = aws_mem_acquire(allocator, sizeof(struct aws_socket));
struct aws_socket *outgoing_socket = aws_mem_calloc(allocator, 1, sizeof(struct aws_socket));
if (aws_socket_init(outgoing_socket, allocator, &task_data->options)) {
goto socket_init_failed;
}
Expand Down

0 comments on commit ff93ab3

Please sign in to comment.