diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2015-10-13 20:25:03 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2015-10-13 20:25:03 +0000 |
commit | 7e13f96dff8da4a706c68d92da8eca591439e3e2 (patch) | |
tree | 0f1fca6dcc8baffd6e2d6c22cf68ba346ab5e205 | |
parent | 2e1616e80b34b8ccd48a5574642751719cd03285 (diff) | |
download | FreeBSD-src-7e13f96dff8da4a706c68d92da8eca591439e3e2.zip FreeBSD-src-7e13f96dff8da4a706c68d92da8eca591439e3e2.tar.gz |
Fix two memory leaks in config(8).
PR: 202145
Submitted by: Kurt Lidl <lidl pix.net>
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 0f873c4..877f934 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -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); } |