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>
This commit is contained in:
parent
d79bad0aa7
commit
efa31092d6
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user