Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:Update
libvirt.17937
594b8b99-libxl-DefineXMLFlags-API-pattern.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 594b8b99-libxl-DefineXMLFlags-API-pattern.patch of Package libvirt.17937
commit 594b8b996c83724d6b1c73641daf277307afe5f7 Author: Jim Fehlig <jfehlig@suse.com> Date: Fri Mar 16 15:29:48 2018 -0600 libxl: convert DefineXMLFlags to use begin/end API pattern Similar to other uses of virDomainObjListAdd, on success add a ref to the virDomainObj so that virDomainObjEndAPI can be called as usual. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: John Ferlan <jferlan@redhat.com> Index: libvirt-4.0.0/src/libxl/libxl_driver.c =================================================================== --- libvirt-4.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-4.0.0/src/libxl/libxl_driver.c @@ -2796,6 +2796,7 @@ libxlDomainDefineXMLFlags(virConnectPtr &oldDef))) goto cleanup; + virObjectRef(vm); def = NULL; vm->persistent = 1; @@ -2803,7 +2804,7 @@ libxlDomainDefineXMLFlags(virConnectPtr cfg->caps, vm->newDef ? vm->newDef : vm->def) < 0) { virDomainObjListRemove(driver->domains, vm); - vm = NULL; + virObjectLock(vm); goto cleanup; } @@ -2817,8 +2818,7 @@ libxlDomainDefineXMLFlags(virConnectPtr cleanup: virDomainDefFree(def); virDomainDefFree(oldDef); - if (vm) - virObjectUnlock(vm); + virDomainObjEndAPI(&vm); if (event) libxlDomainEventQueue(driver, event); virObjectUnref(cfg);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor