# HG changeset patch # User Eran Kornblau # Date 1592207911 14400 # Node ID 7e0719fb528b0ed33ef2670b9b79a6f52744f053 # Parent ccb5ff87ab3ea777651a2a26be4c88d88a890b3f 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. diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- 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) {