Merge pull request #2670 from hbrueckner/for-upstream

udev/path_id: correct segmentation fault due to missing NULL check
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-02-19 15:13:03 -05:00
+1 -1
View File
@@ -712,7 +712,7 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
* devices do not expose their buses and do not provide a unique
* and predictable name that way.
*/
if (streq(udev_device_get_subsystem(dev), "block") && !supported_transport)
if (streq_ptr(udev_device_get_subsystem(dev), "block") && !supported_transport)
path = mfree(path);
if (path != NULL) {