From: David Carlier Date: Tue, 16 Jun 2026 18:58:28 +0000 (+0100) Subject: SSL: fixed memory leak in ngx_ssl_get_ech_outer_server_name(). X-Git-Url: http://git.kaiwu.me/http/doc/static/$%7BGITURL%7D/1?a=commitdiff_plain;h=HEAD;p=nginx.git SSL: fixed memory leak in ngx_ssl_get_ech_outer_server_name(). SSL_ech_get1_status() allocates inner_sni and outer_sni and transfers ownership to the caller. On the allocation-failure path the function returned without freeing them, unlike ngx_ssl_get_ech_status() which frees both on all paths. --- diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 9868dfa2f..c6f9538c9 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -5953,6 +5953,8 @@ ngx_ssl_get_ech_outer_server_name(ngx_connection_t *c, ngx_pool_t *pool, s->data = ngx_pnalloc(pool, s->len); if (s->data == NULL) { + OPENSSL_free(inner_sni); + OPENSSL_free(outer_sni); return NGX_ERROR; }