[PATCH 07/12] ephyr: fix dereference before null check.
Dave Airlie
airlied at gmail.com
Thu Oct 20 03:44:23 PDT 2011
From: Dave Airlie <airlied at redhat.com>
same as the xnest case.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/kdrive/ephyr/ephyr.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 7ebf1c2..67376cc 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -765,7 +765,7 @@ ephyrUpdateModifierState(unsigned int state)
{
DeviceIntPtr pDev = inputInfo.keyboard;
- KeyClassPtr keyc = pDev->key;
+ KeyClassPtr keyc;
int i;
CARD8 mask;
int xkb_state;
@@ -773,6 +773,8 @@ ephyrUpdateModifierState(unsigned int state)
if (!pDev)
return;
+ keyc = pDev->key;
+
xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state);
state = state & 0xff;
--
1.7.6.4
More information about the xorg-devel
mailing list