mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-02 02:37:59 +02:00
Xi: plug memory leak, free previous motion history before allocating new.
This commit is contained in:
parent
ea05cf0813
commit
60c38d248c
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue