diff src/stream/ngx_stream_geo_module.c @ 7214:88aad69eccef

Geo: optimized configuration parser. If the geo block parser has failed, doing more things is pointless.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 21 Feb 2018 15:50:43 +0300
parents c69c13f10502
children 2dc837d16099
line wrap: on
line diff
--- a/src/stream/ngx_stream_geo_module.c
+++ b/src/stream/ngx_stream_geo_module.c
@@ -431,6 +431,10 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx
 
     *cf = save;
 
+    if (rv != NGX_CONF_OK) {
+        goto failed;
+    }
+
     if (ctx.ranges) {
 
         if (ctx.high.low && !ctx.binary_include) {
@@ -522,7 +526,7 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx
     ngx_destroy_pool(ctx.temp_pool);
     ngx_destroy_pool(pool);
 
-    return rv;
+    return NGX_CONF_OK;
 
 failed: