commit | cadac4ec3e0f15974b1f4a0e2a7b5aebe8d76b73 | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Wed Oct 28 10:45:40 2009 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Wed Oct 28 10:45:40 2009 +0000 |
tree | c3b12654a6c6adc3f6ff31ef19e2bc33c8c56d69 | |
parent | b3586d13da9db8ead5cb6c0cb4b40b42bde53e1c [diff] |
fix segfault if http {} block is empty, the bug had been introduced in r3218
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 99ccef9..534fabf 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c
@@ -1352,6 +1352,10 @@ 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++) {