[njs] XML: improved XMLNode.$tags handler.

noreply at nginx.com noreply at nginx.com
Thu Nov 7 19:05:02 UTC 2024


details:   https://github.com/nginx/njs/commit/e476ef9134a58d8967a740d182ea15c075492704
branches:  master
commit:    e476ef9134a58d8967a740d182ea15c075492704
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed, 6 Nov 2024 22:15:22 -0800
description:
XML: improved XMLNode.$tags handler.


---
 external/njs_xml_module.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/external/njs_xml_module.c b/external/njs_xml_module.c
index d9f3bbb5..d5ab9ddd 100644
--- a/external/njs_xml_module.c
+++ b/external/njs_xml_module.c
@@ -1318,12 +1318,12 @@ njs_xml_node_tags_handler(njs_vm_t *vm, xmlNode *current, njs_str_t *name,
             xmlFreeNode(node);
             goto error;
         }
+    }
 
-        ret = xmlReconciliateNs(current->doc, copy);
-        if (njs_slow_path(ret == -1)) {
-            njs_vm_internal_error(vm, "xmlReconciliateNs() failed");
-            goto error;
-        }
+    ret = xmlReconciliateNs(current->doc, copy);
+    if (njs_slow_path(ret == -1)) {
+        njs_vm_internal_error(vm, "xmlReconciliateNs() failed");
+        goto error;
     }
 
     njs_value_undefined_set(retval);


More information about the nginx-devel mailing list