[PATCH] xkb: check for NULL pointer before dereferences it in XkbAddClientResource
Tiago Vignatti
tiago.vignatti at nokia.com
Fri Apr 16 08:42:27 PDT 2010
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
xkb/xkbEvents.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 33741e9..c7f6a66 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -1042,8 +1042,8 @@ XkbInterestPtr interest;
interest = interest->next;
}
interest = xalloc(sizeof(XkbInterestRec));
- bzero(interest,sizeof(XkbInterestRec));
if (interest) {
+ bzero(interest,sizeof(XkbInterestRec));
interest->dev = dev;
interest->client = client;
interest->resource = id;
--
1.6.0.4
More information about the xorg-devel
mailing list