Skip to content
Snippets Groups Projects
Commit 5a11a1ca authored by Vladimir Sementsov-Ogievskiy's avatar Vladimir Sementsov-Ogievskiy Committed by Eric Blake
Browse files

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: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
Reviewed-by: default avatarAlberto Garcia <berto@igalia.com>
Message-Id: <20210202124956.63146-5-vsementsov@virtuozzo.com>
Signed-off-by: default avatarEric Blake <eblake@redhat.com>
parent bc520249
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment