xfree86: duplicate xorg.conf device information before xf86NewInputDevice
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 4 Jul 2011 04:14:39 +0000 (14:14 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 26 Jul 2011 23:31:02 +0000 (09:31 +1000)
commitf0d7e9db28c374a3db359bcb63a7ce79fd84b541
tree5b2db563d96924c93a173ff4d14349216f754bc4
parent8ffddbcf72170e246826ee0f39f18989a29fa218
xfree86: duplicate xorg.conf device information before xf86NewInputDevice

xf86ConfigLayout.inputs contains the information from the xorg.conf
file. Passing this into xf86NewInputDevice means the device will get
cleaned up on exit and the pointers in xf86ConfigLayout.inputs are left
dangling. In the second server generation, this results in a server
crash.

Also, rename pDev to pInfo. pDev is pretty much reserved for DeviceIntPtr
types.

Reproducible: AutoAddDevices off and xorg.conf input sections, trigger
server regeneration.

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