diff options
author | Benjamin Otte <otte@redhat.com> | 2012-02-07 18:01:25 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-02-08 19:06:17 +1000 |
commit | b96275c4cdb164aa71f7aa9fbf88be18886d1936 (patch) | |
tree | b27c6dbdbfc86c5a37da92b7d463ffe7788c87c8 /dix | |
parent | 6241b5e4fdbdb08d30cc8787d858ac27122d2d49 (diff) |
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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/inpututils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c index d279c1d75..9e0c5518c 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -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; } |