All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] bochs: Fix memory leak in bochs_open() error path
Date: Wed, 09 Apr 2014 12:27:19 +0200	[thread overview]
Message-ID: <53452087.7040104@redhat.com> (raw)
In-Reply-To: <1397035209-14086-1-git-send-email-kwolf@redhat.com>

On 04/09/14 11:20, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/bochs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/block/bochs.c b/block/bochs.c
> index 826ec12..50b84a9 100644
> --- a/block/bochs.c
> +++ b/block/bochs.c
> @@ -150,11 +150,13 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
>      s->extent_size = le32_to_cpu(bochs.extent);
>      if (s->extent_size == 0) {
>          error_setg(errp, "Extent size may not be zero");
> -        return -EINVAL;
> +        ret = -EINVAL;
> +        goto fail;
>      } else if (s->extent_size > 0x800000) {
>          error_setg(errp, "Extent size %" PRIu32 " is too large",
>                     s->extent_size);
> -        return -EINVAL;
> +        ret = -EINVAL;
> +        goto fail;
>      }
>  
>      if (s->catalog_size < bs->total_sectors / s->extent_size) {
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

      reply	other threads:[~2014-04-09 10:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09  9:20 [Qemu-devel] [PATCH] bochs: Fix memory leak in bochs_open() error path Kevin Wolf
2014-04-09 10:27 ` Laszlo Ersek [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=53452087.7040104@redhat.com \
    --to=lersek@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.