On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote: > We can't access top after call bdrv_backup_top_drop, as it is already > freed at this time. > > Also, no needs to unref target child by hand, it will be unrefed on > bdrv_close() automatically. > > So, just do bdrv_backup_top_drop if append succeed and one bdrv_unref > otherwise. > > Note, that in !appended case bdrv_unref(top) moved into drained section > on source. It doesn't really matter, but just for code simplicity. > > Fixes: 7df7868b96404 > Cc: qemu-sta...@nongnu.org # v4.2.0 > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > block/backup-top.c | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature