mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-21 22:50:08 +03:00
malloc-fail: Fix memory leak in xmlNodeGetBaseSafe
Short-lived regression.
This commit is contained in:
parent
c2bbeed1fd
commit
0ea47327c2
4
tree.c
4
tree.c
@ -5412,8 +5412,10 @@ xmlNodeGetBaseSafe(const xmlDoc *doc, const xmlNode *cur, xmlChar **baseOut) {
|
||||
}
|
||||
if (cur->type == XML_ELEMENT_NODE) {
|
||||
if (xmlNodeGetAttrValue(cur, BAD_CAST "base", XML_XML_NAMESPACE,
|
||||
&base) < 0)
|
||||
&base) < 0) {
|
||||
xmlFree(ret);
|
||||
return(-1);
|
||||
}
|
||||
if (base != NULL) {
|
||||
if (ret != NULL) {
|
||||
res = xmlBuildURISafe(ret, base, &newbase);
|
||||
|
Loading…
x
Reference in New Issue
Block a user