Pan Nengyuan <pannengy...@huawei.com> 于2020年8月14日周五 下午6:54写道: > > 'local_err' seems forgot to propagate in error path, it'll cause > a memleak. Fix it. > > Reported-by: Euler Robot <euler.ro...@huawei.com> > Signed-off-by: Pan Nengyuan <pannengy...@huawei.com>
Reviewed-by: Li Qiang <liq...@gmail.com> > --- > Cc: Kevin Wolf <kw...@redhat.com> > Cc: Max Reitz <mre...@redhat.com> > Cc: Markus Armbruster <arm...@redhat.com> > Cc: qemu-block@nongnu.org > --- > blockdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/blockdev.c b/blockdev.c > index 3848a9c8ab..842ac289c1 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -1801,6 +1801,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; > } > } > -- > 2.18.2 > >