aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/shape.c')
-rw-r--r--xorg-server/Xext/shape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/Xext/shape.c b/xorg-server/Xext/shape.c
index bb479b159..2fc789ec1 100644
--- a/xorg-server/Xext/shape.c
+++ b/xorg-server/Xext/shape.c
@@ -996,7 +996,7 @@ ProcShapeGetRectangles(ClientPtr client)
nrects = RegionNumRects(region);
box = RegionRects(region);
- rects = malloc(nrects * sizeof(xRectangle));
+ rects = xallocarray(nrects, sizeof(xRectangle));
if (!rects && nrects)
return BadAlloc;
for (i = 0; i < nrects; i++, box++) {