From 171d4c8dc6136aa8c14aedd0ee107d6ba957de04 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 9 Jul 2007 11:03:00 +0200 Subject: 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() --- src/acecad.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3