mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-16 19:32: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
|
|
@ -364,7 +364,7 @@ ProcListExtensions(ClientPtr client)
|
|||
total_length += strlen(extensions[i]->aliases[j]) + 1;
|
||||
}
|
||||
reply.length = (total_length + 3) >> 2;
|
||||
buffer = bufptr = (char *)ALLOCATE_LOCAL(total_length);
|
||||
buffer = bufptr = (char *)xalloc(total_length);
|
||||
if (!buffer)
|
||||
return(BadAlloc);
|
||||
for (i=0; i<NumExtensions; i++)
|
||||
|
|
@ -388,7 +388,7 @@ ProcListExtensions(ClientPtr client)
|
|||
if (reply.length)
|
||||
{
|
||||
WriteToClient(client, total_length, buffer);
|
||||
DEALLOCATE_LOCAL(buffer);
|
||||
xfree(buffer);
|
||||
}
|
||||
return(client->noClientException);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue