Date: Tue, 13 Oct 2015 20:25:03 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289262 - head/usr.sbin/config Message-ID: <201510132025.t9DKP3CT055514@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Tue Oct 13 20:25:03 2015 New Revision: 289262 URL: https://svnweb.freebsd.org/changeset/base/289262 Log: Fix two memory leaks in config(8). PR: 202145 Submitted by: Kurt Lidl <lidl pix.net> Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Oct 13 20:24:57 2015 (r289261) +++ head/usr.sbin/config/mkmakefile.c Tue Oct 13 20:25:03 2015 (r289262) @@ -623,6 +623,7 @@ do_xxfiles(char *tag, FILE *fp) slen = strlen(suff); fprintf(fp, "%sFILES=", SUFF); + free(SUFF); lpos = 8; STAILQ_FOREACH(tp, &ftab, f_next) if (tp->f_type != NODEPEND) { @@ -641,6 +642,7 @@ do_xxfiles(char *tag, FILE *fp) fprintf(fp, "%s ", tp->f_fn); lpos += len + 1; } + free(suff); if (lpos != 8) putc('\n', fp); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510132025.t9DKP3CT055514>