svn commit: r331656 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Conrad Meyer
cem at FreeBSD.org
Tue Mar 27 22:49:07 UTC 2018
Author: cem
Date: Tue Mar 27 22:49:06 2018
New Revision: 331656
URL: https://svnweb.freebsd.org/changeset/base/331656
Log:
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
Modified:
head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c
Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c
==============================================================================
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c Tue Mar 27 21:37:58 2018 (r331655)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c Tue Mar 27 22:49:06 2018 (r331656)
@@ -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;
More information about the svn-src-head
mailing list