mirror of
https://github.com/nginx/nginx.git
synced 2026-07-10 10:54:57 +00:00
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.
This commit is contained in:
parent
da80db978f
commit
3269ede954
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue