aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render/miindex.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/render/miindex.c')
-rw-r--r--xorg-server/render/miindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/render/miindex.c b/xorg-server/render/miindex.c
index 0375e8f88..4119eef66 100644
--- a/xorg-server/render/miindex.c
+++ b/xorg-server/render/miindex.c
@@ -254,7 +254,7 @@ miInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat)
return FALSE;
pFormat->index.nvalues = num;
- pFormat->index.pValues = malloc(num * sizeof(xIndexValue));
+ pFormat->index.pValues = xallocarray(num, sizeof(xIndexValue));
if (!pFormat->index.pValues) {
free(pIndexed);
return FALSE;