summaryrefslogtreecommitdiff
path: root/xserver/mi/mifillrct.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/mi/mifillrct.c')
-rw-r--r--xserver/mi/mifillrct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xserver/mi/mifillrct.c b/xserver/mi/mifillrct.c
index 28f2322e6..eb98a779e 100644
--- a/xserver/mi/mifillrct.c
+++ b/xserver/mi/mifillrct.c
@@ -100,8 +100,8 @@ miPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, /* number of rec
maxheight = max(maxheight, prect->height);
}
- pptFirst = malloc(maxheight * sizeof(DDXPointRec));
- pwFirst = malloc(maxheight * sizeof(int));
+ pptFirst = xallocarray(maxheight, sizeof(DDXPointRec));
+ pwFirst = xallocarray(maxheight, sizeof(int));
if (!pptFirst || !pwFirst) {
free(pwFirst);
free(pptFirst);