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:
Conrad Meyer 2018-03-27 22:49:06 +00:00
parent c8168d9b4c
commit 2f68cdb944
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331656

View File

@ -229,8 +229,12 @@ 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;