From 9394ca0630bba358e6848a0581f85a1ba5f5a3b9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 5 Aug 2007 18:52:16 +0000 Subject: [PATCH] (xundump): Use malloc() instead of calloc() for fldca and fldidx, because the used part of these arrays is explicitely initialized by deffld(). --- src/lib/common/xundump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index e839e207..7200e354 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -771,8 +771,8 @@ xundump(FILE *fp, char *file, int *plno, int expected_table) if (!(ca[i].ca_flags & NSC_EXTRA)) nf += MAX(1, ca[i].ca_type != NSC_STRINGY ? ca[i].ca_len : 0); } - fldca = calloc(nf, sizeof(*fldca)); - fldidx = calloc(nf, sizeof(*fldidx)); + fldca = malloc(nf * sizeof(*fldca)); + fldidx = malloc(nf * sizeof(*fldidx)); caflds = malloc(nca * sizeof(*caflds)); cafldspp = calloc(nca, sizeof(*cafldspp)); cur_type = type;