(xundump): Use malloc() instead of calloc() for fldca and fldidx,
because the used part of these arrays is explicitely initialized by deffld().
This commit is contained in:
parent
5e65a9dd3c
commit
9394ca0630
1 changed files with 2 additions and 2 deletions
|
@ -771,8 +771,8 @@ xundump(FILE *fp, char *file, int *plno, int expected_table)
|
||||||
if (!(ca[i].ca_flags & NSC_EXTRA))
|
if (!(ca[i].ca_flags & NSC_EXTRA))
|
||||||
nf += MAX(1, ca[i].ca_type != NSC_STRINGY ? ca[i].ca_len : 0);
|
nf += MAX(1, ca[i].ca_type != NSC_STRINGY ? ca[i].ca_len : 0);
|
||||||
}
|
}
|
||||||
fldca = calloc(nf, sizeof(*fldca));
|
fldca = malloc(nf * sizeof(*fldca));
|
||||||
fldidx = calloc(nf, sizeof(*fldidx));
|
fldidx = malloc(nf * sizeof(*fldidx));
|
||||||
caflds = malloc(nca * sizeof(*caflds));
|
caflds = malloc(nca * sizeof(*caflds));
|
||||||
cafldspp = calloc(nca, sizeof(*cafldspp));
|
cafldspp = calloc(nca, sizeof(*cafldspp));
|
||||||
cur_type = type;
|
cur_type = type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue