32 lines
963 B
Diff
32 lines
963 B
Diff
From 2278b26da892318be3f1266edaf9a4d3fe5ae582 Mon Sep 17 00:00:00 2001
|
|
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Date: Fri, 24 Feb 2017 14:05:02 +1000
|
|
Subject: [PATCH] Cancel timers on DEVICE_OFF
|
|
|
|
Otherwise we run the risk of having a timer trigger after we removed the
|
|
device. Since we pass InputInfoPtrs and WacomDevicePtrs to the timers as
|
|
arguments, these may have been freed by the time a timer triggers.
|
|
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
---
|
|
src/xf86Wacom.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
|
|
index b4cf25b..26b4e9c 100644
|
|
--- a/src/xf86Wacom.c
|
|
+++ b/src/xf86Wacom.c
|
|
@@ -854,6 +854,9 @@ static int wcmDevProc(DeviceIntPtr pWcm, int what)
|
|
break;
|
|
|
|
case DEVICE_OFF:
|
|
+ TimerCancel(priv->tap_timer);
|
|
+ TimerCancel(priv->serial_timer);
|
|
+ TimerCancel(priv->touch_timer);
|
|
wcmDisableTool(pWcm);
|
|
wcmUnlinkTouchAndPen(pInfo);
|
|
if (pInfo->fd >= 0)
|
|
--
|
|
2.9.3
|
|
|