344582a bhyve: fix virObjectUnlock() usage

Authored and Committed by Roman Bogorodskiy 9 years ago
    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.
    
        
file modified
+24 -12