mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-25 21:02:21 +00: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…
Reference in a new issue