RandR: Remove usage of alloca

Replace with heap allocations.
This commit is contained in:
Daniel Stone 2007-11-05 14:01:11 +00:00
parent 3c1d2fdeff
commit 2d738efb95

View File

@ -386,7 +386,7 @@ ProcRRListOutputProperties (ClientPtr client)
for (prop = output->properties; prop; prop = prop->next)
numProps++;
if (numProps)
if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom))))
if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
return(BadAlloc);
rep.type = X_Reply;
@ -408,7 +408,7 @@ ProcRRListOutputProperties (ClientPtr client)
{
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
DEALLOCATE_LOCAL(pAtoms);
xfree(pAtoms);
}
return(client->noClientException);
}