[libvirt] [PATCH] qemu: avoid dereferencing a NULL pointer

Alex Jia ajia at redhat.com
Mon Oct 17 16:27:39 UTC 2011


----- Original Message -----
From: "Eric Blake" <eblake at redhat.com>

False positive.  Just a few lines earlier, in loop 4, we guaranteed that 
dev was added to driver->activePciHostdevs, therefore, activeDev cannot 
be NULL here.

That said, we could probably simplify things by consolidating loop 5 and 
6 into one, and in the process of that simplification, silence the
> it should consolidate loop 4 and loop 5 into one :-)however, loop 6 steps
> are a clear design if don't consider Coverity complains.

Alex

spurious warning from the static analyzer.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list