diff options
Diffstat (limited to 'hw/dmx/dmxcmap.c')
-rw-r--r-- | hw/dmx/dmxcmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c index 450627b40..7a87a9864 100644 --- a/hw/dmx/dmxcmap.c +++ b/hw/dmx/dmxcmap.c @@ -177,7 +177,7 @@ dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef) dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap); if (dmxScreen->beDisplay && (pColormap->pVisual->class & DynamicClass)) { - XColor *color = malloc(sizeof(*color) * ndef); + XColor *color = xallocarray(ndef, sizeof(*color)); int i; if (color) { |