From ff93ab377288a40c36810f5e7bb13f264002f0b3 Mon Sep 17 00:00:00 2001 From: Vera Xia Date: Wed, 9 Oct 2024 23:29:17 -0700 Subject: [PATCH] use mem_calloc for socket --- source/channel_bootstrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/channel_bootstrap.c b/source/channel_bootstrap.c index 7969ba57b..6fb2a9461 100644 --- a/source/channel_bootstrap.c +++ b/source/channel_bootstrap.c @@ -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; }