summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ws.c9
1 files 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;
}