libxl: MigratePrepare: use standard begin and end API pattern
libxlDomainMigrationPrepare adds the incoming domain def to the list of domains via virDomainObjListAdd, but never adds its own ref to the returned virDomainObj as other callers of virDomainObjListAdd do. libxlDomainMigrationPrepareTunnel3 suffers the same discrepancy. Change both to add a ref to the virDomainObj after a successful virDomainObjListAdd, similar to other callers. This ensures a consistent pattern throughout the drivers and allows using the virDomainObjEndAPI function for cleanup. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Showing
想要评论请 注册 或 登录