aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-06-21 23:18:36 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:13:43 +0200
commite0291f30df9df99bfbd987e7d181237925d3c0e3 (patch)
tree2c07000bad81da66c793c6f6eedffdd9f74df831
parentcfcaa442d19f017f7485cc0ea4101f2652c2db4f (diff)
downloadnx-libs-e0291f30df9df99bfbd987e7d181237925d3c0e3.tar.gz
nx-libs-e0291f30df9df99bfbd987e7d181237925d3c0e3.tar.bz2
nx-libs-e0291f30df9df99bfbd987e7d181237925d3c0e3.zip
NXdixfonts.c: use calloc for LFclosurePtr
Just to be sure. It is used at lots of locations afterwards.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
index dba734ad7..8b3fdcc8d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
@@ -690,7 +690,7 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
if (length > XLFDMAXFONTNAMELEN)
return BadAlloc;
- if (!(c = (LFclosurePtr) malloc(sizeof *c)))
+ if (!(c = (LFclosurePtr) calloc(1, sizeof *c)))
return BadAlloc;
c->fpe_list = (FontPathElementPtr *)
malloc(sizeof(FontPathElementPtr) * num_fpes);