diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:12:59 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:34:43 +0000 |
commit | 914922fd6100a409a3dfd1c64511ed6bdc344bef (patch) | |
tree | 9d073014ac8bc779832aa98619ca54536927fa05 /dix/resource.c | |
parent | 3b77689266e729411229ec83d2a90578ebc1d82f (diff) |
DIX: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'dix/resource.c')
-rw-r--r-- | dix/resource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dix/resource.c b/dix/resource.c index e83c529d3..c8297fb67 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -507,13 +507,13 @@ RebuildTable(int client) */ j = 2 * clientTable[client].buckets; - tails = (ResourcePtr **)ALLOCATE_LOCAL(j * sizeof(ResourcePtr *)); + tails = (ResourcePtr **)xalloc(j * sizeof(ResourcePtr *)); if (!tails) return; resources = (ResourcePtr *)xalloc(j * sizeof(ResourcePtr)); if (!resources) { - DEALLOCATE_LOCAL(tails); + xfree(tails); return; } for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) @@ -536,7 +536,7 @@ RebuildTable(int client) *tptr = &res->next; } } - DEALLOCATE_LOCAL(tails); + xfree(tails); clientTable[client].buckets *= 2; xfree(clientTable[client].resources); clientTable[client].resources = resources; |