aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/fake/fake.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/fake/fake.c')
-rw-r--r--xorg-server/hw/kdrive/fake/fake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/hw/kdrive/fake/fake.c b/xorg-server/hw/kdrive/fake/fake.c
index 90e3ec9a6..04a727897 100644
--- a/xorg-server/hw/kdrive/fake/fake.c
+++ b/xorg-server/hw/kdrive/fake/fake.c
@@ -158,7 +158,7 @@ fakeMapFramebuffer(KdScreenInfo * screen)
priv->bytes_per_line =
((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
free(priv->base);
- priv->base = malloc(priv->bytes_per_line * screen->height);
+ priv->base = xallocarray(priv->bytes_per_line, screen->height);
if (scrpriv->shadow) {
if (!KdShadowFbAlloc