[libvirt] [PATCH 2/2] node_device: avoid null dereference on error

Eric Blake eblake at redhat.com
Wed May 11 18:05:00 UTC 2011


On 05/11/2011 10:26 AM, Laine Stump wrote:
> On 05/04/2011 07:37 PM, Eric Blake wrote:
>> If we plow on after udev_device_get_syspath fails, we will hit a NULL
>> dereference.  Clang found one due to strdup later in udevSetParent,
>> but in fact we hit a NULL dereference sooner because of the use of
>> STREQ within virNodeDeviceFindBySysfsPath.
>>
>> * src/conf/node_device_conf.h (virNodeDeviceFindBySysfsPath): Mark
>> path argument non-null.
>> * src/node_device/node_device_udev.c (udevSetParent): Avoid null
>> dereference.
> 
> ACK.

Thanks; pushed.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110511/e33f7fec/attachment-0001.sig>


More information about the libvir-list mailing list