[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH alt 3/7] qemu-img: Fix insignifcant memleak
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH alt 3/7] qemu-img: Fix insignifcant memleak |
Date: |
Thu, 31 Jul 2014 09:59:30 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
The Saturday 26 Jul 2014 à 21:22:07 (+0200), Max Reitz wrote :
> As soon as options is set in img_amend(), it needs to be freed before
> the function returns. This leak is rather insignifcant, as qemu-img will
> exit subsequently anyway, but there's no point in not fixing it.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> qemu-img.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/qemu-img.c b/qemu-img.c
> index a06f425..d73a68a 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -2809,7 +2809,9 @@ static int img_amend(int argc, char **argv)
> }
>
> if (optind != argc - 1) {
> - error_exit("Expecting one image file name");
> + error_report("Expecting one image file name");
> + ret = -1;
> + goto out;
> }
>
> flags = BDRV_O_FLAGS | BDRV_O_RDWR;
> --
> 2.0.3
>
>
Reviewed-by: Benoit Canet <address@hidden>
- [Qemu-devel] [PATCH alt 0/7] block/qcow2: Improve zero cluster expansion, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 1/7] block: Add status callback to bdrv_amend_options(), Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 2/7] qemu-img: Add progress output for amend, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 3/7] qemu-img: Fix insignifcant memleak, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 4/7] block/qcow2: Implement status CB for amend, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 5/7] block/qcow2: Make get_refcount() global, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 6/7] block/qcow2: Simplify shared L2 handling in amend, Max Reitz, 2014/07/26
- [Qemu-devel] [PATCH alt 7/7] iotests: Expand test 061, Max Reitz, 2014/07/26