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 <vsement...@virtuozzo.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Reviewed-by: Alberto Garcia <be...@igalia.com> --- blockdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 3a896181fd..db59be7c68 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1823,8 +1823,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) { + if (bdrv_set_backing_hd(target_bs, source, errp) < 0) { goto unref; } } -- 2.21.3