From e1b340d67cc1a26464bbc683fcef696857651fe8 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 6 Dec 2009 10:32:31 +0000 Subject: Remove the input driver before returning NULL on error in PreInit(). --- src/ws.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ws.c b/src/ws.c index 15461bc..7a889ab 100644 --- a/src/ws.c +++ b/src/ws.c @@ -336,10 +336,13 @@ wsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) pInfo->flags |= XI86_CONFIGURED; return pInfo; fail: - if (priv != NULL) + if (priv != NULL) { xfree(priv); - if (pInfo != NULL) - xfree(pInfo); + pInfo->private = NULL; + } + if (pInfo != NULL) { + xf86DeleteInput(pInfo, 0); + } return NULL; } -- cgit v1.2.3