From 37d37cdaea9c010c5f7f0ab878617c8239d14d15 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 31 Aug 2013 12:59:27 +1000 Subject: [PATCH] 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 Reviewed-by: Benjamin Tissoires --- libevdev/libevdev-uinput.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libevdev/libevdev-uinput.c b/libevdev/libevdev-uinput.c index de2833e..88ec313 100644 --- a/libevdev/libevdev-uinput.c +++ b/libevdev/libevdev-uinput.c @@ -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; } }