aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mipolyrect.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/mi/mipolyrect.c')
-rw-r--r--xorg-server/mi/mipolyrect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/mi/mipolyrect.c b/xorg-server/mi/mipolyrect.c
index 830822513..7ebf9db8d 100644
--- a/xorg-server/mi/mipolyrect.c
+++ b/xorg-server/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;