xfree86: Remove devices that failed to enable on startup
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 27 Jun 2011 06:30:28 +0000 (16:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 26 Jul 2011 23:31:01 +0000 (09:31 +1000)
commit8ffddbcf72170e246826ee0f39f18989a29fa218
treebf9bd801b64613e86ce308915cfb599ebfe53079
parent6cea28fe4b7a4a22ad270d8c71403db84a9bfb2c
xfree86: Remove devices that failed to enable on startup

Devices that succeeded during PreInit and DEVICE_INIT but failed in
DEVICE_ON would be deleted through xf86DeleteInput but not removed from the
list of input devices (and not turned off). The result was a double free on
server shutdown.

Fix this by calling RemoveDevice if EnableDevice fails.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
hw/xfree86/common/xf86Xinput.c