From e45fa2204aca183104e3862b00625fca6cfb309e Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Fri, 22 May 2026 18:36:33 -0700 Subject: [PATCH] Parser: fixed function scope checks --- src/njs_variable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/njs_variable.c b/src/njs_variable.c index b65e5934..7fcaed46 100644 --- a/src/njs_variable.c +++ b/src/njs_variable.c @@ -58,7 +58,7 @@ njs_variable_function_add(njs_parser_t *parser, njs_parser_scope_t *scope, } root = njs_function_scope(scope); - if (njs_slow_path(scope == NULL)) { + if (njs_slow_path(root == NULL)) { return NULL; } @@ -275,7 +275,7 @@ njs_variable_scope_add(njs_parser_t *parser, njs_parser_scope_t *scope, if (index == NJS_INDEX_NONE) { root = njs_function_scope(scope); - if (njs_slow_path(scope == NULL)) { + if (njs_slow_path(root == NULL)) { return NULL; } -- 2.47.3