summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2021-09-14 16:22:17 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2021-09-15 11:06:44 +0200
commitc01ac52b296aa794476784a246f8e4117b6b6e06 (patch)
treefd5f1398b788933ced9195b671f071d63880d625 /hw
parent138d4eba7b0afd2bb839a8cbedf7245e19841013 (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwayland/xwayland-input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 26b3630c7..8482c89ae 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -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;
}