]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bhyve: fix virObjectUnlock() usage
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 17 May 2014 19:08:14 +0000 (23:08 +0400)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 21 May 2014 15:45:29 +0000 (19:45 +0400)
commit344582a8a7623b2032a79ee8052a1631288f8cd9
treee71f242d882368d954fda2a84d592efc2a6d28a1
parentb51804535a75610a145f083bb57f16301f816b1a
bhyve: fix virObjectUnlock() usage

In a number of places in the bhyve driver, virObjectUnlock()
is called with an arg without check if the arg is non-NULL, which
could result in passing NULL value and a warning like:

virObjectUnlock:340 : Object 0x0 ((unknown)) is not a virObjectLockable instance

* src/bhyve/bhyve_driver.c (bhyveDomainGetInfo)
(bhyveDomainGetState, bhyveDomainGetAutostart)
(bhyveDomainSetAutostart, bhyveDomainIsActive)
(bhyveDomainIsPersistent, bhyveDomainGetXMLDesc)
(bhyveDomainUndefine, bhyveDomainLookupByUUID)
(bhyveDomainLookupByName, bhyveDomainLookupByID)
(bhyveDomainCreateWithFlags, bhyveDomainOpenConsole):
Check if arg is not NULL before calling virObjectUnlock on it.
src/bhyve/bhyve_driver.c