From cb1d1c73444d26884634aa1bc0e5410cd52a1371 Mon Sep 17 00:00:00 2001 From: Wang Rui <55612496+wr-web@users.noreply.github.com> Date: Sun, 10 May 2026 22:52:56 +0800 Subject: [PATCH] Fix reference counting for PyList_SetItem Remove unnecessary reference count decrement for newName. --- Externals/LibXML/python/libxml.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Externals/LibXML/python/libxml.c b/Externals/LibXML/python/libxml.c index 747e44cf8..01d4a3f56 100644 --- a/Externals/LibXML/python/libxml.c +++ b/Externals/LibXML/python/libxml.c @@ -1172,7 +1172,6 @@ pythonAttributeDecl(void *user_data, for (node = tree; node != NULL; node = node->next) { newName = PyString_FromString((char *) node->name); PyList_SetItem(nameList, count, newName); - Py_DECREF(newName); count++; } result = PyObject_CallMethod(handler, (char *) "attributeDecl",