xwayland: Fix memory allocation test

Due to a typo in tablet_pad_group(), we would allocate a variable
("group") and test another one ("pad") for allocation success.

Spotted by covscan.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Fixes: commit 8475e63 - "xwayland: add tablet pad support"
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
Olivier Fourdan 2021-09-14 16:22:17 +02:00
parent 138d4eba7b
commit c01ac52b29

View File

@ -2268,7 +2268,7 @@ tablet_pad_group(void *data,
struct xwl_tablet_pad_group *group;
group = calloc(1, sizeof *group);
if (pad == NULL) {
if (group == NULL) {
ErrorF("%s ENOMEM\n", __func__);
return;
}