summaryrefslogtreecommitdiff
path: root/xserver/hw/dmx/dmxextension.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/dmx/dmxextension.c')
-rw-r--r--xserver/hw/dmx/dmxextension.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xserver/hw/dmx/dmxextension.c b/xserver/hw/dmx/dmxextension.c
index fcc97e3df..75d7166f3 100644
--- a/xserver/hw/dmx/dmxextension.c
+++ b/xserver/hw/dmx/dmxextension.c
@@ -1188,8 +1188,8 @@ dmxBERestoreRenderGlyph(void *value, XID id, void *n)
/* Now allocate the memory we need */
images = calloc(len_images, sizeof(char));
- gids = malloc(glyphSet->hash.tableEntries * sizeof(Glyph));
- glyphs = malloc(glyphSet->hash.tableEntries * sizeof(XGlyphInfo));
+ gids = xallocarray(glyphSet->hash.tableEntries, sizeof(Glyph));
+ glyphs = xallocarray(glyphSet->hash.tableEntries, sizeof(XGlyphInfo));
pos = images;
ctr = 0;