diff options
author | Pan Nengyuan <pannengyuan@huawei.com> | 2020-10-23 14:12:17 +0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-12-13 23:56:16 +0100 |
commit | 94237657af9ac7af6bc9fa0c5d9f0af1a39adb45 (patch) | |
tree | 1c3687de815a8a806d4fdeff3a79520c5d44e619 | |
parent | cb8d0851f1c00daafd736757a22f4820ec081b68 (diff) | |
download | qemu-94237657af9ac7af6bc9fa0c5d9f0af1a39adb45.zip qemu-94237657af9ac7af6bc9fa0c5d9f0af1a39adb45.tar.gz qemu-94237657af9ac7af6bc9fa0c5d9f0af1a39adb45.tar.bz2 |
blockdev: Fix a memleak in drive_backup_prepare()
'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: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-7-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | blockdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1827,6 +1827,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; } } |