aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/fb')
-rw-r--r--xorg-server/fb/fbcopy.c2
-rw-r--r--xorg-server/fb/fbpict.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/fb/fbcopy.c b/xorg-server/fb/fbcopy.c
index 5bbabc39f..6af10ccf7 100644
--- a/xorg-server/fb/fbcopy.c
+++ b/xorg-server/fb/fbcopy.c
@@ -194,7 +194,7 @@ fbCopyNto1(DrawablePtr pSrcDrawable,
height = pbox->y2 - pbox->y1;
tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT);
- tmp = malloc(tmpStride * height * sizeof(FbStip));
+ tmp = xallocarray(tmpStride * height, sizeof(FbStip));
if (!tmp)
return;
diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c
index c8378ad90..021f17883 100644
--- a/xorg-server/fb/fbpict.c
+++ b/xorg-server/fb/fbpict.c
@@ -124,7 +124,7 @@ fbGlyphs(CARD8 op,
pixman_glyph_cache_freeze (glyphCache);
if (n_glyphs > N_STACK_GLYPHS) {
- if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t))))
+ if (!(pglyphs = xallocarray(n_glyphs, sizeof(pixman_glyph_t))))
goto out;
}