[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH 02/14] block/vvfat: Plug memory le
From: |
Benoît Canet |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH 02/14] block/vvfat: Plug memory leak in enable_write_target() |
Date: |
Tue, 27 May 2014 12:23:04 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
The Monday 26 May 2014 à 19:37:03 (+0200), Markus Armbruster wrote :
> I figure the leak originated in bdrv_create2(), and was duplicated
> into callers when commit 91a073ak dropped that function. Looks like
> the other places have since been fixed.
>
> Spotted by Coverity.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> block/vvfat.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/block/vvfat.c b/block/vvfat.c
> index c3af7ff..6a0d246 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -2927,6 +2927,7 @@ static int enable_write_target(BDRVVVFATState *s)
> set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
>
> ret = bdrv_create(bdrv_qcow, s->qcow_filename, options, &local_err);
> + free_option_parameters(options);
> if (ret < 0) {
> qerror_report_err(local_err);
> error_free(local_err);
> --
> 1.9.3
>
>
Reviewed-by: Benoit Canet <address@hidden>