Xi: realloc to->valuator instead of allocing it blindly.
This commit is contained in:
parent
502689847b
commit
d0395a7530
|
@ -385,7 +385,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
|
|||
if (from->valuator)
|
||||
{
|
||||
ValuatorClassPtr v;
|
||||
to->valuator = xalloc(sizeof(ValuatorClassRec) +
|
||||
to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) +
|
||||
from->valuator->numAxes * sizeof(AxisInfo) +
|
||||
from->valuator->numAxes * sizeof(unsigned int));
|
||||
v = to->valuator;
|
||||
|
|
Loading…
Reference in New Issue
Block a user