You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
856 B
28 lines
856 B
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> |
|
Date: Mon, 9 Jul 2007 09:03:00 +0000 (+0200) |
|
Subject: Don't crash X when the tablet wasn't found. |
|
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-input-acecad.git;a=commitdiff;h=171d4c8dc6136aa8c14aedd0ee107d6ba957de04 |
|
|
|
Don't crash X when the tablet wasn't found. |
|
|
|
X would crash when switching to console if the acecad module was loaded but the tablet had not been configured. |
|
|
|
Fix by properly freeing structures before returning NULL in PreInit() |
|
--- |
|
|
|
--- a/src/acecad.c |
|
+++ b/src/acecad.c |
|
@@ -488,8 +488,12 @@ SetupProc_fail: |
|
xf86CloseSerial (local->fd); |
|
if ((priv) && (priv->buffer)) |
|
XisbFree (priv->buffer); |
|
- if (priv) |
|
+ if (priv) { |
|
xfree (priv); |
|
+ if (local) |
|
+ local->private = NULL; |
|
+ } |
|
+ xf86DeleteInput(local, 0); |
|
return NULL; |
|
} |
|
|
|
|