mirror of
https://github.com/nginx/nginx.git
synced 2024-12-24 08:00:14 -06:00
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.
This commit is contained in:
parent
0a683fdd93
commit
1bbc37d35c
@ -1469,14 +1469,14 @@ ngx_http_server_names(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf,
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user