[PATCH] xkb: check for NULL pointer before dereferences it in XkbAddClientResource

Tiago Vignatti tiago.vignatti at nokia.com
Mon Apr 19 10:58:07 PDT 2010


---
 xkb/xkbEvents.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 33741e9..9755f98 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;
-- 
1.6.0.4



More information about the xorg-devel mailing list