changeset 1122:3728476ab96d

stop on superfluous closing "}"
author Igor Sysoev <igor@sysoev.ru>
date Tue, 20 Feb 2007 14:33:26 +0000
parents b3c492eb086f
children 88dc269bbca2
files src/core/ngx_conf_file.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -145,6 +145,12 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t
         }
 
         if (rc == NGX_CONF_BLOCK_DONE) {
+            if (!block) {
+                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
+                rc = NGX_ERROR;
+                break;
+            }
+
             block = 0;
         }