mirror of
https://github.com/nginx/nginx.git
synced 2025-08-06 06:46:16 +08:00
fix segfault if http {} block is empty, the bug had been introduced in r3218
This commit is contained in:
parent
b3586d13da
commit
cadac4ec3e
@ -1352,6 +1352,10 @@ ngx_http_optimize_servers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf,
|
||||
ngx_http_conf_port_t *port;
|
||||
ngx_http_conf_addr_t *addr;
|
||||
|
||||
if (ports == NULL) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
port = ports->elts;
|
||||
for (p = 0; p < ports->nelts; p++) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user