From 934281126f6c602fa4bd0c2e29d8c9f44fe532b8 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 5 Nov 2007 14:18:22 +0000 Subject: Xext: Remove usage of alloca Replace with heap allocations. --- Xext/xres.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Xext/xres.c') diff --git a/Xext/xres.c b/Xext/xres.c index 1617337bf..32cc9030d 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -63,7 +63,7 @@ ProcXResQueryClients (ClientPtr client) REQUEST_SIZE_MATCH(xXResQueryClientsReq); - current_clients = ALLOCATE_LOCAL((currentMaxClients - 1) * sizeof(int)); + current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); num_clients = 0; for(i = 1; i < currentMaxClients; i++) { @@ -101,7 +101,7 @@ ProcXResQueryClients (ClientPtr client) } } - DEALLOCATE_LOCAL(current_clients); + xfree(current_clients); return (client->noClientException); } @@ -134,7 +134,7 @@ ProcXResQueryClientResources (ClientPtr client) return BadValue; } - counts = ALLOCATE_LOCAL((lastResourceType + 1) * sizeof(int)); + counts = xalloc((lastResourceType + 1) * sizeof(int)); memset(counts, 0, (lastResourceType + 1) * sizeof(int)); @@ -183,7 +183,7 @@ ProcXResQueryClientResources (ClientPtr client) } } - DEALLOCATE_LOCAL(counts); + xfree(counts); return (client->noClientException); } -- cgit v1.2.3