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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user