aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/record/set.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/record/set.c')
-rw-r--r--xorg-server/record/set.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xorg-server/record/set.c b/xorg-server/record/set.c
index 34faa617e..e0db385b9 100644
--- a/xorg-server/record/set.c
+++ b/xorg-server/record/set.c
@@ -303,9 +303,7 @@ IntervalListCreateSet(RecordSetInterval * pIntervals, int nIntervals,
CARD16 first;
if (nIntervals > 0) {
- stackIntervals =
- (RecordSetInterval *) malloc(sizeof(RecordSetInterval) *
- nIntervals);
+ stackIntervals = xallocarray(nIntervals, sizeof(RecordSetInterval));
if (!stackIntervals)
return NULL;