aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-02-02 15:49:46 +0300
committerEric Blake <eblake@redhat.com>2021-03-08 15:14:12 -0600
commit5a11a1ca0d0ed5be52070f1da8de89ef85941183 (patch)
tree189e7b6f8233c8daf9610be51cc02e15cc455d66 /blockdev.c
parentbc520249595845d387aa5b5e4eeeade673931a98 (diff)
blockdev: fix drive_backup_prepare() missed error
We leak local_err and don't report failure to the caller. It's definitely wrong, let's fix. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20210202124956.63146-5-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c
index cd438e60e3..65884a2826 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1825,9 +1825,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp)
aio_context_acquire(aio_context);
if (set_backing_hd) {
- bdrv_set_backing_hd(target_bs, source, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (bdrv_set_backing_hd(target_bs, source, errp) < 0) {
goto unref;
}
}