summaryrefslogtreecommitdiff
path: root/mi/mizerline.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/mizerline.c')
-rw-r--r--mi/mizerline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mi/mizerline.c b/mi/mizerline.c
index 5a2447014..2f22d2309 100644
--- a/mi/mizerline.c
+++ b/mi/mizerline.c
@@ -150,8 +150,8 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
width = xright - xleft + 1;
height = ybottom - ytop + 1;
list_len = (height >= width) ? height : width;
- pspanInit = malloc(list_len * sizeof(DDXPointRec));
- pwidthInit = malloc(list_len * sizeof(int));
+ pspanInit = xallocarray(list_len, sizeof(DDXPointRec));
+ pwidthInit = xallocarray(list_len, sizeof(int));
if (!pspanInit || !pwidthInit) {
free(pspanInit);
free(pwidthInit);