aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/fbdev/fbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/fbdev/fbdev.c')
-rw-r--r--xorg-server/hw/kdrive/fbdev/fbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.c b/xorg-server/hw/kdrive/fbdev/fbdev.c
index 95f64cbef..23f750924 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.c
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.c
@@ -677,7 +677,7 @@ fbdevCreateColormap(ColormapPtr pmap)
case FB_VISUAL_STATIC_PSEUDOCOLOR:
pVisual = pmap->pVisual;
nent = pVisual->ColormapEntries;
- pdefs = malloc(nent * sizeof(xColorItem));
+ pdefs = xallocarray(nent, sizeof(xColorItem));
if (!pdefs)
return FALSE;
for (i = 0; i < nent; i++)