1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

Fix memory leak in xmlAllocOutputBufferInternal error path

Thanks to Anish K Kurian for the report. Closes #60.
This commit is contained in:
Nick Wellnhofer 2019-05-20 13:26:08 +02:00
parent e79a903f3e
commit f824a4bd4d

View File

@ -2435,6 +2435,7 @@ xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) {
if (encoder != NULL) {
ret->conv = xmlBufCreateSize(4000);
if (ret->conv == NULL) {
xmlBufFree(ret->buffer);
xmlFree(ret);
return(NULL);
}