diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 7fcca5ce0..1fb3b9d7b 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -939,7 +939,7 @@ hostx_screen_init(KdScreenInfo *screen, scrpriv->ximg->byte_order = IMAGE_BYTE_ORDER; scrpriv->ximg->data = - xallocarray(scrpriv->ximg->stride, buffer_height); + calloc(scrpriv->ximg->stride, buffer_height); } if (!HostX.size_set_from_configure) @@ -1008,7 +1008,7 @@ hostx_screen_init(KdScreenInfo *screen, *bits_per_pixel = scrpriv->server_depth; EPHYR_DBG("server bpp %i", bytes_per_pixel); - scrpriv->fb_data = xallocarray (stride, buffer_height); + scrpriv->fb_data = calloc(stride, buffer_height); return scrpriv->fb_data; } } diff --git a/hw/kdrive/src/kshadow.c b/hw/kdrive/src/kshadow.c index 292a03321..ef0dd99dd 100644 --- a/hw/kdrive/src/kshadow.c +++ b/hw/kdrive/src/kshadow.c @@ -34,7 +34,7 @@ KdShadowFbAlloc(KdScreenInfo * screen, Bool rotate) /* use fb computation for width */ paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); - buf = xallocarray(paddedWidth, height); + buf = calloc(paddedWidth, height); if (!buf) return FALSE; if (screen->fb.shadow)