Fix memory leaks when failing to create a uinput device
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 27 Feb 2014 01:29:19 +0000 (11:29 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 27 Feb 2014 03:22:50 +0000 (13:22 +1000)
commitfdf737494ed940d68ce68c52ee029417bb68c8ff
tree04f257ba6349dbda5c716da73ef0d6b894c8852f
parentf162f00f1db2cd0141958a4d8ed4a665bfc888e3
Fix memory leaks when failing to create a uinput device

For an invalid fd, or a failure to open the device, the pre-allocated uinput
device struct would leak.

We can drop the open_uinput() function now, since skipping to the error
handling means we'll return -errno anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
libevdev/libevdev-uinput.c