diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-04-19 20:46:12 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-04-21 18:07:20 +0300 |
commit | 96784f4fcb6c2fb82f6d1abbd28ea1e189e4e6f5 (patch) | |
tree | 95c6aa5ac62100fc12f45831ca31f2f8703d7f92 /xkb | |
parent | 057c147541bde6f0cbe22ca069b43a97ddc95baf (diff) |
xkb: check for NULL pointer before dereferences it in XkbAddClientResource
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkbEvents.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 33741e9c6..9755f9846 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -1041,8 +1041,7 @@ XkbInterestPtr interest; return ((interest->resource==id)?interest:NULL); interest = interest->next; } - interest = xalloc(sizeof(XkbInterestRec)); - bzero(interest,sizeof(XkbInterestRec)); + interest = xcalloc(1, sizeof(XkbInterestRec)); if (interest) { interest->dev = dev; interest->client = client; |