Commit b394eac8 authored by Mike Gabriel's avatar Mike Gabriel

dixfonts.c: use calloc for LFclosurePtr

... to keep dix/dixfonts and hw/nxagnet/NXdixfonts.c in sync.
parent 59e46dc5
...@@ -930,7 +930,7 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, ...@@ -930,7 +930,7 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
if (length > XLFDMAXFONTNAMELEN) if (length > XLFDMAXFONTNAMELEN)
return BadAlloc; return BadAlloc;
if (!(c = (LFclosurePtr) malloc(sizeof *c))) if (!(c = (LFclosurePtr) calloc(1, sizeof *c)))
return BadAlloc; return BadAlloc;
c->fpe_list = (FontPathElementPtr *) c->fpe_list = (FontPathElementPtr *)
malloc(sizeof(FontPathElementPtr) * num_fpes); malloc(sizeof(FontPathElementPtr) * num_fpes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment