Commit 5f1f455c authored by Nick Wellnhofer's avatar Nick Wellnhofer

Fix potential memory leak in xmlBufBackToBuffer

Fixes bug #794373
https://bugzilla.gnome.org/show_bug.cgi?id=794373

Also see merge request !42
parent e32afd3f
......@@ -1204,10 +1204,10 @@ xmlBufferPtr
xmlBufBackToBuffer(xmlBufPtr buf) {
xmlBufferPtr ret;
if ((buf == NULL) || (buf->error))
if (buf == NULL)
return(NULL);
CHECK_COMPAT(buf)
if (buf->buffer == NULL) {
if ((buf->error) || (buf->buffer == NULL)) {
xmlBufFree(buf);
return(NULL);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment