diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-07-09 11:03:00 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-07-09 11:03:00 +0200 |
commit | 171d4c8dc6136aa8c14aedd0ee107d6ba957de04 (patch) | |
tree | d490e08ef5f9ccade8932c936153baa631495ee3 /src | |
parent | c69e2c95b9eb2381709c9de14957d24ab919b5bc (diff) |
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()
Diffstat (limited to 'src')
-rw-r--r-- | src/acecad.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/acecad.c b/src/acecad.c index 829261f..ec5f83e 100644 --- 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; } |