mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 00:30:07 +01:00
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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue