aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_geo_module.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2018-02-21 15:50:43 +0300
committerRuslan Ermilov <ru@nginx.com>2018-02-21 15:50:43 +0300
commit7a45918e0bb5502cda940565de726a13140e92cf (patch)
tree35f9bad87ee23d217cf4ad8d7859387d8e1bcc2a /src/http/modules/ngx_http_geo_module.c
parentf98a8c4db622223485ad5f175c79ecc0695ed5cc (diff)
downloadnginx-7a45918e0bb5502cda940565de726a13140e92cf.tar.gz
nginx-7a45918e0bb5502cda940565de726a13140e92cf.zip
Geo: optimized configuration parser.
If the geo block parser has failed, doing more things is pointless.
Diffstat (limited to 'src/http/modules/ngx_http_geo_module.c')
-rw-r--r--src/http/modules/ngx_http_geo_module.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c
index 9102c987d..c11bafa6f 100644
--- a/src/http/modules/ngx_http_geo_module.c
+++ b/src/http/modules/ngx_http_geo_module.c
@@ -461,6 +461,10 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
*cf = save;
+ if (rv != NGX_CONF_OK) {
+ goto failed;
+ }
+
geo->proxies = ctx.proxies;
geo->proxy_recursive = ctx.proxy_recursive;
@@ -555,7 +559,7 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_destroy_pool(ctx.temp_pool);
ngx_destroy_pool(pool);
- return rv;
+ return NGX_CONF_OK;
failed: