xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: s.hauer@pengutronix.de
Subject: Re: [PATCH] unlzo: fix input buffer free
Date: Mon, 23 Jan 2012 13:38:18 +0000	[thread overview]
Message-ID: <CB43134A.37F36%keir@xen.org> (raw)
In-Reply-To: <4F1D6E02020000780006E684@nat28.tlf.novell.com>

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

      reply	other threads:[~2012-01-23 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 13:26 [PATCH] unlzo: fix input buffer free Jan Beulich
2012-01-23 13:38 ` Keir Fraser [this message]

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=CB43134A.37F36%keir@xen.org \
    --to=keir@xen.org \
    --cc=JBeulich@suse.com \
    --cc=s.hauer@pengutronix.de \
    --cc=xen-devel@lists.xensource.com \
    /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).