* [PATCH] unlzo: fix input buffer free
@ 2012-01-23 13:26 Jan Beulich
2012-01-23 13:38 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-01-23 13:26 UTC (permalink / raw)
To: xen-devel@lists.xensource.com; +Cc: s.hauer
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
unlzo modifies the pointer to in_buf, so we have to free the original
buffer, not the modified pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/unlzo.c
+++ b/xen/common/unlzo.c
@@ -254,7 +254,7 @@ STATIC int INIT unlzo(u8 *input, unsigne
ret = 0;
exit_2:
if (!input)
- free(in_buf);
+ free(in_buf_save);
exit_1:
if (!output)
free(out_buf);
[-- Attachment #2: unlzo-free-input-buffer.patch --]
[-- Type: text/plain, Size: 481 bytes --]
unlzo: fix input buffer free
unlzo modifies the pointer to in_buf, so we have to free the original
buffer, not the modified pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/unlzo.c
+++ b/xen/common/unlzo.c
@@ -254,7 +254,7 @@ STATIC int INIT unlzo(u8 *input, unsigne
ret = 0;
exit_2:
if (!input)
- free(in_buf);
+ free(in_buf_save);
exit_1:
if (!output)
free(out_buf);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] unlzo: fix input buffer free
2012-01-23 13:26 [PATCH] unlzo: fix input buffer free Jan Beulich
@ 2012-01-23 13:38 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2012-01-23 13:38 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xensource.com; +Cc: s.hauer
On 23/01/2012 13:26, "Jan Beulich" <JBeulich@suse.com> wrote:
> unlzo modifies the pointer to in_buf, so we have to free the original
> buffer, not the modified pointer.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- a/xen/common/unlzo.c
> +++ b/xen/common/unlzo.c
> @@ -254,7 +254,7 @@ STATIC int INIT unlzo(u8 *input, unsigne
> ret = 0;
> exit_2:
> if (!input)
> - free(in_buf);
> + free(in_buf_save);
> exit_1:
> if (!output)
> free(out_buf);
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-23 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 13:26 [PATCH] unlzo: fix input buffer free Jan Beulich
2012-01-23 13:38 ` Keir Fraser
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).