On Wed,  9 Sep 2020 21:59:20 +0300
Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> wrote:

> 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>

>  blockdev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index 36bef6b188..74259527c1 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1797,8 +1797,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;
>          }
>      }


Reply via email to