summaryrefslogtreecommitdiff
path: root/xserver/mi/mipolyrect.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/mi/mipolyrect.c')
-rw-r--r--xserver/mi/mipolyrect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xserver/mi/mipolyrect.c b/xserver/mi/mipolyrect.c
index 830822513..7ebf9db8d 100644
--- a/xserver/mi/mipolyrect.c
+++ b/xserver/mi/mipolyrect.c
@@ -88,7 +88,7 @@ miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects)
offset2 = pGC->lineWidth;
offset1 = offset2 >> 1;
offset3 = offset2 - offset1;
- tmp = malloc(ntmp * sizeof(xRectangle));
+ tmp = xallocarray(ntmp, sizeof(xRectangle));
if (!tmp)
return;
t = tmp;