mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-06 03:20:29 +01:00
touchpad: check calloc result
Check the value returned by calloc. Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
aba28c0b73
commit
97af5c33a3
1 changed files with 2 additions and 0 deletions
|
|
@ -721,6 +721,8 @@ tp_init_slots(struct tp_dispatch *tp,
|
|||
}
|
||||
tp->touches = calloc(tp->ntouches,
|
||||
sizeof(struct tp_touch));
|
||||
if (!tp->touches)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue