diff --git a/xmlIO.c b/xmlIO.c index d26ddc41..5cab16f4 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -2936,7 +2936,7 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) { ret->closecallback = NULL; errcode = xmlBufAdd(ret->buffer, (const xmlChar *) mem, size); if (errcode != 0) { - xmlFree(ret); + xmlFreeParserInputBuffer(ret); return(NULL); } }