mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +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:
committed by
Peter Hutterer
parent
6241b5e4fd
commit
b96275c4cd
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user