qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] bochs: Fix memory leak in bochs_open() error pa


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH] bochs: Fix memory leak in bochs_open() error path
Date: Wed, 09 Apr 2014 12:27:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/09/14 11:20, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]