summaryrefslogtreecommitdiffstats
path: root/crypto/xts.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2020-01-21 15:28:01 +0100
committerMax Reitz2020-02-06 13:47:45 +0100
commit0df62f45c1de6c020f1e6fba4eeafd248209b003 (patch)
tree4013a0cb0ed58a50709235cfce09d68a88b042df /crypto/xts.c
parentqcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value (diff)
downloadqemu-0df62f45c1de6c020f1e6fba4eeafd248209b003.tar.gz
qemu-0df62f45c1de6c020f1e6fba4eeafd248209b003.tar.xz
qemu-0df62f45c1de6c020f1e6fba4eeafd248209b003.zip
block/backup-top: fix failure path
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-stable@nongnu.org # v4.2.0 Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20200121142802.21467-2-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'crypto/xts.c')
0 files changed, 0 insertions, 0 deletions