From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Lasse Collin <lasse.collin@tukaani.org>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH] unlzo: Fix input buffer free
Date: Thu, 17 Nov 2011 22:29:20 +0100 [thread overview]
Message-ID: <1321565360-28111-1-git-send-email-s.hauer@pengutronix.de> (raw)
unlzo modifies the pointer to in_buf, so we have to free the
original buffer, not the modified pointer. This only happens
when a fill function is passed, a case which is currently unused
in the kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/decompress_unlzo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index 5a7a2ad..4531294 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -279,7 +279,7 @@ STATIC inline int INIT unlzo(u8 *input, int in_len,
ret = 0;
exit_2:
if (!input)
- free(in_buf);
+ free(in_buf_save);
exit_1:
if (!output)
free(out_buf);
--
1.7.7.1
next reply other threads:[~2011-11-17 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 21:29 Sascha Hauer [this message]
2011-11-18 17:10 ` [PATCH] unlzo: Fix input buffer free Lasse Collin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321565360-28111-1-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=akpm@linux-foundation.org \
--cc=lasse.collin@tukaani.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).