mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 22:10:03 +01:00
Input: Plug memory leak in device free
Remember to also free the motion history, if we're using the DIX-managed history.
This commit is contained in:
parent
e92743bc98
commit
07c56abf84
1 changed files with 6 additions and 1 deletions
|
|
@ -431,8 +431,13 @@ CloseDevice(DeviceIntPtr dev)
|
||||||
xfree(dev->key);
|
xfree(dev->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->valuator)
|
if (dev->valuator) {
|
||||||
|
/* Counterpart to 'biggest hack ever' in init. */
|
||||||
|
if (dev->valuator->motion &&
|
||||||
|
dev->valuator->GetMotionProc == GetMotionHistory)
|
||||||
|
xfree(dev->valuator->motion);
|
||||||
xfree(dev->valuator);
|
xfree(dev->valuator);
|
||||||
|
}
|
||||||
|
|
||||||
if (dev->button) {
|
if (dev->button) {
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue