mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-25 04:40:05 +01:00
uinput: preserve the errno before cleaning up
libevdev_uinput_destroy() may/will botch the errno, make sure we save it before use. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
09529a6a65
commit
debe9b030c
1 changed files with 2 additions and 1 deletions
|
|
@ -344,8 +344,9 @@ libevdev_uinput_create_from_device(const struct libevdev *dev, int fd, struct li
|
|||
return 0;
|
||||
|
||||
error:
|
||||
rc = -errno;
|
||||
libevdev_uinput_destroy(new_device);
|
||||
return -errno;
|
||||
return rc;
|
||||
}
|
||||
|
||||
LIBEVDEV_EXPORT void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue