]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/xserver.git/blob - debian/patches/608-dix-fix-an-out-of-memory-crash.patch
Imported Debian patch 2:1.11.4-0ubuntu4
[glsdk/xserver.git] / debian / patches / 608-dix-fix-an-out-of-memory-crash.patch
1 From b96275c4cdb164aa71f7aa9fbf88be18886d1936 Mon Sep 17 00:00:00 2001
2 From: Benjamin Otte <otte@redhat.com>
3 Date: Tue, 7 Feb 2012 18:01:25 +1000
4 Subject: [PATCH] dix: fix an out-of-memory crash
6 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
7 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
8 ---
9  dix/inpututils.c |    3 +++
10  1 files changed, 3 insertions(+), 0 deletions(-)
12 diff --git a/dix/inpututils.c b/dix/inpututils.c
13 index d279c1d..9e0c551 100644
14 --- a/dix/inpututils.c
15 +++ b/dix/inpututils.c
16 @@ -432,6 +432,9 @@ valuator_mask_new(int num_valuators)
17       * flying-car future, when we can dynamically alloc the masks and are
18       * not constrained by signals, we can start using num_valuators */
19      ValuatorMask *mask = calloc(1, sizeof(ValuatorMask));
20 +    if (mask == NULL)
21 +        return NULL;
22 +
23      mask->last_bit = -1;
24      return mask;
25  }
26 -- 
27 1.7.8.3