mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-03 01:58:06 +02:00
Xi: don't use devices after removing them
RemoveDevice() frees the DeviceIntPtr, we shouldn't use the pointer after that Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
3420a7778c
commit
58bff17e43
1 changed files with 5 additions and 4 deletions
|
|
@ -304,15 +304,16 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
|
|||
flags[keybd->id] |= XIDeviceDisabled;
|
||||
flags[ptr->id] |= XIDeviceDisabled;
|
||||
|
||||
RemoveDevice(XTestptr, FALSE);
|
||||
RemoveDevice(XTestkeybd, FALSE);
|
||||
RemoveDevice(keybd, FALSE);
|
||||
RemoveDevice(ptr, FALSE);
|
||||
flags[XTestptr->id] |= XISlaveRemoved;
|
||||
flags[XTestkeybd->id] |= XISlaveRemoved;
|
||||
flags[keybd->id] |= XIMasterRemoved;
|
||||
flags[ptr->id] |= XIMasterRemoved;
|
||||
|
||||
RemoveDevice(XTestptr, FALSE);
|
||||
RemoveDevice(XTestkeybd, FALSE);
|
||||
RemoveDevice(keybd, FALSE);
|
||||
RemoveDevice(ptr, FALSE);
|
||||
|
||||
unwind:
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue