]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: MigrateBegin: Dont call EndAPI in helper function
authorJim Fehlig <jfehlig@suse.com>
Mon, 12 Mar 2018 17:51:43 +0000 (11:51 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 16 Mar 2018 17:14:57 +0000 (11:14 -0600)
commit64370c4b81f04ca73c195854966c6740e01483f2
tree2794a7d52266b4a004fab9baa555c152601cbad3
parent06a7a5db66101cf9443c0d2fac43dfc8c2ba68bb
libxl: MigrateBegin: Dont call EndAPI in helper function

The libxlDomainMigrateBegin3Params API locks and ref counts the associated
virDomainObj but relies on the helper function libxlDomainMigrationBegin
to unref/unlock the object. libxlDomainMigrationBegin is also used by
libxlDomainMigratePerform3Params for p2p migration, but in that case the
lock/ref and unref/unlock are properly handled in the API entry point. So
p2p migrations suffer a double unref/unlock in the Perform API.

Remove the unref/unlock (virDomainObjEndAPI) from libxlDomainMigrationBegin
and adjust libxlDomainMigrateBegin3Params to properly unref/unlock
the virDomainObj on success and error paths.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/libxl/libxl_driver.c
src/libxl/libxl_migration.c