[libvirt] [PATCH] bhyve: fix virObjectUnlock() usage

Daniel P. Berrange berrange at redhat.com
Mon May 19 10:38:17 UTC 2014


On Sat, May 17, 2014 at 11:44:48PM +0400, Roman Bogorodskiy wrote:
> 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 | 39 ++++++++++++++++++++++++++-------------
>  1 file changed, 26 insertions(+), 13 deletions(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list