1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-23 17:33:50 +03:00

SAX2: Fix null deref after malloc failure

Short-lived regression.
This commit is contained in:
Nick Wellnhofer 2024-06-17 20:58:27 +02:00
parent 1d8bd1262b
commit 860fb460ea

12
SAX2.c
View File

@ -962,12 +962,12 @@ xmlSAX1Attribute(xmlParserCtxtPtr ctxt, const xmlChar *fullname,
ns = NULL;
xmlFree(name);
name = xmlStrdup(fullname);
if (name == NULL) {
xmlSAX2ErrMemory(ctxt);
if (ns != NULL)
xmlFree(ns);
return;
}
}
if (name == NULL) {
xmlSAX2ErrMemory(ctxt);
if (ns != NULL)
xmlFree(ns);
return;
}
/*