diff options
Diffstat (limited to 'xorg-server/mi/mifillrct.c')
-rw-r--r-- | xorg-server/mi/mifillrct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/mi/mifillrct.c b/xorg-server/mi/mifillrct.c index 28f2322e6..eb98a779e 100644 --- a/xorg-server/mi/mifillrct.c +++ b/xorg-server/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); |