Fix libinput_device_group_find_group() to return NULL on failure

struct list isn't a null-terminated list, list_for_each() causes 'g' to be set
to the list head at the end of the loop. Returning that as group caused random
memory to be overwritten.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2015-11-02 08:46:25 +10:00
parent 38f20850e1
commit 9949d4ee08

View file

@ -2011,7 +2011,7 @@ libinput_device_group_find_group(struct libinput *libinput,
}
}
return g;
return NULL;
}
void