mirror of
https://github.com/curl/curl.git
synced 2026-08-15 10:33:38 +03:00
ngtcp2: fix memory leak on connect failure
When a QUIC connection using ngtcp2 failed immediately, the TLS instances were not always released. Closes #16113
This commit is contained in:
parent
f6da27052e
commit
399ca56be5
1 changed files with 2 additions and 0 deletions
|
|
@ -175,6 +175,8 @@ static void cf_ngtcp2_ctx_init(struct cf_ngtcp2_ctx *ctx)
|
|||
static void cf_ngtcp2_ctx_free(struct cf_ngtcp2_ctx *ctx)
|
||||
{
|
||||
if(ctx && ctx->initialized) {
|
||||
Curl_vquic_tls_cleanup(&ctx->tls);
|
||||
vquic_ctx_free(&ctx->q);
|
||||
Curl_bufcp_free(&ctx->stream_bufcp);
|
||||
Curl_dyn_free(&ctx->scratch);
|
||||
Curl_hash_clean(&ctx->streams);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue