mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-19 11:18:26 +02:00
dix: fix an out-of-memory crash
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
6241b5e4fd
commit
b96275c4cd
1 changed files with 3 additions and 0 deletions
|
|
@ -432,6 +432,9 @@ valuator_mask_new(int num_valuators)
|
|||
* flying-car future, when we can dynamically alloc the masks and are
|
||||
* not constrained by signals, we can start using num_valuators */
|
||||
ValuatorMask *mask = calloc(1, sizeof(ValuatorMask));
|
||||
if (mask == NULL)
|
||||
return NULL;
|
||||
|
||||
mask->last_bit = -1;
|
||||
return mask;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue