[libxml2] Fix potential memory leak in xmlBufBackToBuffer
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix potential memory leak in xmlBufBackToBuffer
- Date: Fri, 13 Sep 2019 15:51:05 +0000 (UTC)
commit 5f1f455c2f659eb6c82adf2b1d3ae00466367873
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Fri Sep 13 15:51:16 2019 +0200
Fix potential memory leak in xmlBufBackToBuffer
Fixes bug #794373
https://bugzilla.gnome.org/show_bug.cgi?id=794373
Also see merge request !42
buf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/buf.c b/buf.c
old mode 100644
new mode 100755
index 21cb9d80..6a8721bc
--- a/buf.c
+++ b/buf.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]