Skip to content

Commit

Permalink
do not leak when running out of memory while initializing a connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Jul 31, 2024
1 parent 07c15d0 commit 6c0bc1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/quicly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c0bc1b

Please sign in to comment.