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
|
@ -431,8 +431,13 @@ CloseDevice(DeviceIntPtr dev)
|
|||
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);
|
||||
}
|
||||
|
||||
if (dev->button) {
|
||||
#ifdef XKB
|
||||
|
|
Loading…
Reference in New Issue