summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-30 16:03:43 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-04 13:45:20 +1000
commit6dc7f5e127b4b60b27f661862c5698e6f9ea7e49 (patch)
treed7db75f634b1cb9ba632f75b1a3d66db64e48f81
parentb00b015aaa81c7da2a419649851004d481f33e3c (diff)
Only try to free the timer if it's actually there.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Christoph Brill <egore911@egore911.de> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--src/synaptics.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 5b932fd..bc4b1b4 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -635,7 +635,9 @@ static void SynapticsUnInit(InputDriverPtr drv,
InputInfoPtr local,
int flags)
{
- xfree(((SynapticsPrivate *)local->private)->timer);
+ SynapticsPrivate *priv = ((SynapticsPrivate *)local->private);
+ if (priv && priv->timer)
+ xfree(priv->timer);
xfree(local->private);
local->private = NULL;
xf86DeleteInput(local, 0);