Through some code paths it is possible that NULL is being passed in the
'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along
to bzero().

Signed-off-by: Tomas Carnecky <[email protected]>
---
 xkb/xkbLEDs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 59cdba4..dfdd5a2 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -750,7 +750,8 @@ XkbFlushLedEvents(  DeviceIntPtr                    dev,
            XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
        XkbSendExtensionDeviceNotify(dev,cause->client,ed);
     }
-    bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
+    if (ed)
+       bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
     return;
 }
 
-- 
1.6.5.4


_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to