Xi: plug memory leak, free previous motion history before allocating new.
This commit is contained in:
parent
ea05cf0813
commit
60c38d248c
|
@ -390,6 +390,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
if (from->valuator)
|
||||
{
|
||||
ValuatorClassPtr v;
|
||||
if (to->valuator)
|
||||
xfree(to->valuator->motion);
|
||||
to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) +
|
||||
from->valuator->numAxes * sizeof(AxisInfo) +
|
||||
from->valuator->numAxes * sizeof(unsigned int));
|
||||
|
|
Loading…
Reference in New Issue
Block a user