diff options
Diffstat (limited to 'Xext/xf86bigfont.c')
-rw-r--r-- | Xext/xf86bigfont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index 46b3242d1..95b537170 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -401,7 +401,7 @@ ProcXF86BigfontQueryFont(ClientPtr client) } else { #endif - pCI = malloc(nCharInfos * sizeof(xCharInfo)); + pCI = xallocarray(nCharInfos, sizeof(xCharInfo)); if (!pCI) return BadAlloc; #ifdef HAS_SHM @@ -463,7 +463,7 @@ ProcXF86BigfontQueryFont(ClientPtr client) if (hashModulus > nCharInfos + 1) hashModulus = nCharInfos + 1; - tmp = malloc((4 * nCharInfos + 1) * sizeof(CARD16)); + tmp = xallocarray(4 * nCharInfos + 1, sizeof(CARD16)); if (!tmp) { if (!pDesc) free(pCI); |