summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-net_id.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2013-03-03 12:55:08 -0500
committerKay Sievers <kay@vrfy.org>2013-03-03 19:02:36 +0100
commitbb26309dd042c79de907f103d83f398b9436cde0 (patch)
treea3b8ab1b18a3ee0c6e40b2da8f411e443edbe06c /src/udev/udev-builtin-net_id.c
parent1d600df55bdba448b05d6f8293028d6b6702914b (diff)
downloadsystemd-bb26309dd042c79de907f103d83f398b9436cde0.tar.gz
udev: fix segfault with android rndis
The android gadget driver for network tethering over rndis somehow has a parent device with a null subsystem. Probably this is bug in android driver, but it is easy enough to make systemd/udev behave gracefully and not segfault. And this will help for making linux distros with systemd (like fedora) work on android devices.
Diffstat (limited to 'src/udev/udev-builtin-net_id.c')
-rw-r--r--src/udev/udev-builtin-net_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index fbacb45877..fdbec5ae91 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -256,7 +256,7 @@ static int names_pci(struct udev_device *dev, struct netnames *names) {
if (!parent)
return -ENOENT;
/* check if our direct parent is a PCI device with no other bus in-between */
- if (streq("pci", udev_device_get_subsystem(parent))) {
+ if (streq_ptr("pci", udev_device_get_subsystem(parent))) {
names->type = NET_PCI;
names->pcidev = parent;
} else {