1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

save: Report malloc failure in xmlAttrSerializeTxtContent

This commit is contained in:
Nick Wellnhofer 2024-03-05 20:00:44 +01:00
parent 3494aa4fd5
commit b1e75a9191

View File

@ -2401,6 +2401,8 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
return;
out = xmlOutputBufferCreateBuffer(buf, NULL);
xmlBufAttrSerializeTxtContent(out, doc, string);
if ((out == NULL) || (out->error))
xmlFree(xmlBufferDetach(buf));
xmlOutputBufferClose(out);
}