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

save: Report malloc failure in xmlAttrSerializeTxtContent

Flush buffer before checking for errors.
This commit is contained in:
Nick Wellnhofer
2024-04-09 15:39:06 +02:00
parent 1f18d37798
commit 20fca2bb3d

View File

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