1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-13 13:17:36 +03:00

tree: Don't free linked DOM namespaces in error case

This commit is contained in:
Nick Wellnhofer 2024-03-12 17:40:30 +01:00
parent 27f07f1002
commit 09905670f4

2
tree.c
View File

@ -8363,7 +8363,6 @@ xmlDOMWrapNSNormAcquireNormalizedNs(xmlDocPtr doc,
*/
if (xmlDOMWrapNsMapAddItem(nsMap, -1, ns,
tmpns, XML_TREE_NSMAP_DOC) == NULL) {
xmlFreeNs(tmpns);
return (-1);
}
*retNs = tmpns;
@ -8393,7 +8392,6 @@ xmlDOMWrapNSNormAcquireNormalizedNs(xmlDocPtr doc,
}
}
if (xmlDOMWrapNsMapAddItem(nsMap, -1, ns, tmpns, depth) == NULL) {
xmlFreeNs(tmpns);
return (-1);
}
*retNs = tmpns;