diff options
author | Matthieu Herrb <matthieu@openbsd.org> | 2009-12-06 10:32:31 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@openbsd.org> | 2009-12-06 10:32:31 +0000 |
commit | e1b340d67cc1a26464bbc683fcef696857651fe8 (patch) | |
tree | ac5dd501d4675376c4b420f4aebb06dd2b579388 | |
parent | 2c2f38946df4c0cd0c7813507af57128a422bf74 (diff) |
Remove the input driver before returning NULL on error in PreInit().
-rw-r--r-- | src/ws.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; } |