ctfconvert: Fix minor memory leaks in STABS parser
In an error case, free leaked objects. Does anything use STABS anymore? Probably not. Reported by: Coverity Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
c8168d9b4c
commit
2f68cdb944
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331656
@ -229,9 +229,13 @@ parse_fun(char *cp, iidesc_t *ii)
|
||||
nargs++;
|
||||
if (nargs > FUNCARG_DEF)
|
||||
args = xrealloc(args, sizeof (tdesc_t *) * nargs);
|
||||
if (!(cp = read_tid(cp, &args[nargs - 1])))
|
||||
if (!(cp = read_tid(cp, &args[nargs - 1]))) {
|
||||
if (tdp->t_type == TYPEDEF_UNRES)
|
||||
free(tdp);
|
||||
free(args);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
ii->ii_type = iitype;
|
||||
ii->ii_dtype = tdp;
|
||||
|
Loading…
Reference in New Issue
Block a user