[libvirt] [PATCH 2/3] libxl_driver: Resolve Coverity errors
Eric Blake
eblake at redhat.com
Tue Mar 5 17:00:07 UTC 2013
On 03/05/2013 05:43 AM, John Ferlan wrote:
> 1. The virObjectLock() call was unconditional, but Unlock was conditional
> on vm being valid. Removed the check
>
> 2. A call to virDomainEventNewFromObj() isn't guaranteed to return an
> event - that check needs to be made prior to libxlDomainEventQueue()
> of the event. Did not add libxlDriverLock/Unlock around the call since
> some callers already have lock taken
Someday, we should remove the big libxl lock in the same way that danpb
just removed the big qemu lock; but that's an independent project.
>
> 3. Need to initialize fd = -1 in libxlDoDomainSave() since we can jump
> to cleanup before it's set.
>
> 4. Missing break;'s in libxlDomainModifyDeviceFlags() for case
> LIBXL_DEVICE_UPDATE. The default: case would report an error
More precisely, the device update fell through to the default case and
reported an error even if it had succeeded.
At any rate, all of these fixes look correct.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130305/092ab406/attachment-0001.sig>
More information about the libvir-list
mailing list