svn commit: r289262 - head/usr.sbin/config
Rui Paulo
rpaulo at FreeBSD.org
Tue Oct 13 20:25:04 UTC 2015
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);
}
More information about the svn-src-all
mailing list