[libxml2] Fix memory leak in LZMA decompressor
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix memory leak in LZMA decompressor
- Date: Thu, 7 Sep 2017 17:19:55 +0000 (UTC)
commit 07e227ed00d0fb787c06cf03069b2904e692e770
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Thu Sep 7 18:55:46 2017 +0200
Fix memory leak in LZMA decompressor
xzlib.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/xzlib.c b/xzlib.c
index f43632b..8bafbd3 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -797,6 +797,8 @@ __libxml2_xzclose(xzFile file)
xmlFree(state->in);
}
xmlFree(state->path);
+ if ((state->msg != NULL) && (state->err != LZMA_MEM_ERROR))
+ xmlFree(state->msg);
ret = close(state->fd);
xmlFree(state);
return ret ? ret : LZMA_OK;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]