diff options
author | Ander Conselvan de Oliveira <ander@mandriva.com.br> | 2009-04-06 16:01:20 -0300 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-15 12:17:57 +1000 |
commit | efa31092d6703397121a0ada4f7205a8ecad3d3d (patch) | |
tree | d45ae2e4d0f112abe1894e17ef6ec9d3505527f3 | |
parent | d79bad0aa70403ead8ec87bac8463a6e2005802c (diff) |
xfree86: Remove device from inputInfo.devices if ActivateDevice failed.
After the call to xf86ActivateDevice, the new device will be added to
inputInfo.devices. However, if the subsequent call to ActivateDevice
fails, the correponding InputInfoRec for the device is deleted but an
entry still remains in inputInfo.devices. This might lead to a server
crash later on (on InitAndStartDevices for instance) when the device
control proc would be called for an invalid device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 96aff1538..a035fca7f 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -548,6 +548,7 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) if (rval != Success) { xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); + RemoveDevice(dev); goto unwind; } |