]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix error propagation in qemuMigrationBegin
authorJiri Denemark <jdenemar@redhat.com>
Mon, 23 May 2022 10:27:51 +0000 (12:27 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 23 May 2022 11:13:37 +0000 (13:13 +0200)
commitc500955e95ed9c10d0d5bba0190d1b496f383a91
treed0b43a453ff6a5cec7b28ed480df023d8fb92b7c
parent42cb54804588aa82e32219fc56c15817f8b1edb0
qemu: Fix error propagation in qemuMigrationBegin

Commit v8.3.0-152-g49ef0f95c6 removed explicit VIR_FREE from
qemuMigrationBegin, effectively reverting v1.2.14-57-g77ddd0bba2

The xml variable was used to hold the return value and thus had to be
unset when an error happened after xml was already non-NULL. Such code
may be quite confusing though and we usually avoid it by not storing
anything to a return variable until everything succeeded.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_migration.c