Skip to content

Commit

Permalink
fix assert issue with systemd udev
Browse files Browse the repository at this point in the history
do not call udev_device_get_parent(udev_device_get_parent(dev))
directly as a null return on the parent will cause an assert in
udev_device_get_parent
  • Loading branch information
heitbaum committed Jun 14, 2024
1 parent fd511a9 commit 9d0fdd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,9 @@ static int input_device_add(struct udev_device *udev_device)
return -1;
}

name = udev_device_get_property_value(udev_device_get_parent(udev_device), "NAME");
name = udev_device_get_parent(udev_device);
if (name)
name = udev_device_get_property_value(name, "NAME");
if ((name != NULL) && (strncmp(name, "\"eventlircd\"", strlen("\"eventlircd\"")) == 0)) {
return 0;
}
Expand Down

0 comments on commit 9d0fdd8

Please sign in to comment.