summaryrefslogtreecommitdiff
path: root/Xext/xres.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:18:22 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:46 +0000
commit934281126f6c602fa4bd0c2e29d8c9f44fe532b8 (patch)
tree90ae5f5a9d43a266d8ba361764370e6874f079c7 /Xext/xres.c
parentfb32bb9839b615f7297fbfac2050bc216682f01c (diff)
Xext: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'Xext/xres.c')
-rw-r--r--Xext/xres.c8
1 files changed, 4 insertions, 4 deletions
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);
}