From 6c0bc1b2682d2b7fc2680ac141f73f96066e9981 Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Wed, 31 Jul 2024 10:42:15 +0900 Subject: [PATCH] do not leak when running out of memory while initializing a connection --- lib/quicly.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/quicly.c b/lib/quicly.c index ac90462f..07cde3fc 100644 --- a/lib/quicly.c +++ b/lib/quicly.c @@ -2530,6 +2530,8 @@ static quicly_conn_t *create_connection(quicly_context_t *ctx, uint32_t protocol conn->crypto.tls = tls; if (new_path(conn, 0, remote_addr, local_addr) != 0) { unlock_now(conn); + if (pacer != NULL) + free(pacer); ptls_free(tls); free(conn); return NULL;