[PATCH libevdev 4/9] uinput: don't try to set the syspath twice

Benjamin Tissoires benjamin.tissoires at gmail.com
Mon Sep 9 07:52:30 PDT 2013


On Tue, Sep 3, 2013 at 9:07 AM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 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 at who-t.net>
> ---
>  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;

good catch :)

Reviewed-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>

>                 }
>         }
>
> --
> 1.8.2.1
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list