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

Roman Bogorodskiy bogorodskiy at gmail.com
Wed May 21 15:55:28 UTC 2014


  Daniel P. Berrange wrote:

> 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

Pushed, thanks!

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140521/4dc625ed/attachment-0001.sig>


More information about the libvir-list mailing list