• E
    node_device: avoid null dereference on error · 98cd17bd
    Eric Blake 提交于
    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.
    98cd17bd
node_device_udev.c 46.8 KB