diff --git a/dbe/dbe.c b/dbe/dbe.c index 0c1f2e589..868d03d71 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -470,7 +470,7 @@ ProcDbeSwapBuffers(ClientPtr client) dbeSwapInfo = (xDbeSwapInfo *) &stuff[1]; /* Allocate array to record swap information. */ - swapInfo = xallocarray(nStuff, sizeof(DbeSwapInfoRec)); + swapInfo = calloc(nStuff, sizeof(DbeSwapInfoRec)); if (swapInfo == NULL) { return BadAlloc; } @@ -583,7 +583,7 @@ ProcDbeGetVisualInfo(ClientPtr client) return BadAlloc; /* Make sure any specified drawables are valid. */ if (stuff->n != 0) { - if (!(pDrawables = xallocarray(stuff->n, sizeof(DrawablePtr)))) { + if (!(pDrawables = calloc(stuff->n, sizeof(DrawablePtr)))) { return BadAlloc; } diff --git a/dbe/midbe.c b/dbe/midbe.c index 3033062f8..65c588c7b 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -85,7 +85,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo) } /* Allocate an array of XdbeVisualInfo items. */ - if (!(visInfo = xallocarray(count, sizeof(XdbeVisualInfo)))) { + if (!(visInfo = calloc(count, sizeof(XdbeVisualInfo)))) { return FALSE; /* memory alloc failure */ }