mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-25 01:10:10 +01:00
uinput: don't try to set the syspath twice
If we have it, stop searching for it. Otherwise a second device with the same name would overwrite the first, causing a leak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
parent
22d2a735c4
commit
37d37cdaea
1 changed files with 1 additions and 0 deletions
|
|
@ -230,6 +230,7 @@ fetch_syspath_and_devnode(struct libevdev_uinput *uinput_dev)
|
|||
strcat(buf, namelist[i]->d_name);
|
||||
uinput_dev->syspath = strdup(buf);
|
||||
uinput_dev->devnode = fetch_device_node(buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue