mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-15 14:20:21 +01:00
udev-seat: fix leak when failing to add devices
udev-monitor and the udev_monitor_source would leak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7b09c753de
commit
d50c5108c1
1 changed files with 3 additions and 1 deletions
|
|
@ -227,8 +227,10 @@ udev_input_enable(struct udev_input *input)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (udev_input_add_devices(input, udev) < 0)
|
||||
if (udev_input_add_devices(input, udev) < 0) {
|
||||
udev_input_disable(input);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue