Fix two memory leaks in config(8).

PR:		202145
Submitted by:	Kurt Lidl <lidl pix.net>
This commit is contained in:
Rui Paulo 2015-10-13 20:25:03 +00:00
parent e26b6f00f9
commit 8ed645520e

View File

@ -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);
}