[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare()
From: |
Li Qiang |
Subject: |
Re: [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare() |
Date: |
Wed, 26 Aug 2020 18:45:14 +0800 |
Pan Nengyuan <pannengyuan@huawei.com> 于2020年8月14日周五 下午6:54写道:
>
> 'local_err' seems forgot to propagate in error path, it'll cause
> a memleak. Fix it.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
> ---
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: qemu-block@nongnu.org
> ---
> blockdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/blockdev.c b/blockdev.c
> index 3848a9c8ab..842ac289c1 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1801,6 +1801,7 @@ static void drive_backup_prepare(BlkActionState
> *common, Error **errp)
> if (set_backing_hd) {
> bdrv_set_backing_hd(target_bs, source, &local_err);
> if (local_err) {
> + error_propagate(errp, local_err);
> goto unref;
> }
> }
> --
> 2.18.2
>
>
- Re: [PATCH 03/12] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init, (continued)
- [PATCH 05/12] target/i386/sev: Plug memleak in sev_read_file_base64, Pan Nengyuan, 2020/08/14
- [PATCH 01/12] qga/channel-posix: Plug memory leak in ga_channel_write_all(), Pan Nengyuan, 2020/08/14
- [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context(), Pan Nengyuan, 2020/08/14
- [PATCH 08/12] migration/colo: Plug memleaks in colo_process_incoming_thread, Pan Nengyuan, 2020/08/14
- [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare(), Pan Nengyuan, 2020/08/14
- [PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features, Pan Nengyuan, 2020/08/14
- [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file, Pan Nengyuan, 2020/08/14
- [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group(), Pan Nengyuan, 2020/08/14