Skip to content

Commit

Permalink
Merge pull request #589 from h2o/kazuho/fix-memleak
Browse files Browse the repository at this point in the history
do not leak when running out of memory while initializing a connection
  • Loading branch information
kazuho authored Jul 31, 2024
2 parents 36fa7ad + 6c0bc1b commit e44f59b
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 e44f59b

Please sign in to comment.