Mercurial > hg > nginx-quic
changeset 7974:7e0719fb528b
Fixed potential leak of temp pool.
In case ngx_hash_add_key() fails, need to goto failed instead of returning,
so that temp_pool will be destoryed.
author | Eran Kornblau <erankor@gmail.com> |
---|---|
date | Mon, 15 Jun 2020 03:58:31 -0400 |
parents | ccb5ff87ab3e |
children | 3dcb1aba894a |
files | src/http/ngx_http.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1469,14 +1469,14 @@ ngx_http_server_names(ngx_conf_t *cf, ng NGX_HASH_WILDCARD_KEY); if (rc == NGX_ERROR) { - return NGX_ERROR; + goto failed; } if (rc == NGX_DECLINED) { ngx_log_error(NGX_LOG_EMERG, cf->log, 0, "invalid server name or wildcard \"%V\" on %V", &name[n].name, &addr->opt.addr_text); - return NGX_ERROR; + goto failed; } if (rc == NGX_BUSY) {