DIX: Remove usage of alloca

Replace with heap allocations.
This commit is contained in:
Daniel Stone 2007-11-05 14:12:59 +00:00
commit 914922fd61
8 changed files with 57 additions and 57 deletions

View file

@ -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);
}