mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
DIX: Remove usage of alloca
Replace with heap allocations.
This commit is contained in:
parent
3b77689266
commit
914922fd61
8 changed files with 57 additions and 57 deletions
|
|
@ -1997,7 +1997,7 @@ ProcGetMotionEvents(ClientPtr client)
|
|||
{
|
||||
if (CompareTimeStamps(stop, currentTime) == LATER)
|
||||
stop = currentTime;
|
||||
coords = (xTimecoord *)ALLOCATE_LOCAL(mouse->valuator->numMotionEvents
|
||||
coords = (xTimecoord *)xalloc(mouse->valuator->numMotionEvents
|
||||
* sizeof(xTimecoord));
|
||||
if (!coords)
|
||||
return BadAlloc;
|
||||
|
|
@ -2031,7 +2031,7 @@ ProcGetMotionEvents(ClientPtr client)
|
|||
(char *)coords);
|
||||
}
|
||||
if (coords)
|
||||
DEALLOCATE_LOCAL(coords);
|
||||
xfree(coords);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue