fix a small memory leak

This commit is contained in:
Holger Vogt 2018-08-19 17:24:10 +02:00
parent 7e4b68c708
commit 8c9b18ef7e
1 changed files with 3 additions and 1 deletions

View File

@ -423,7 +423,9 @@ printres(char *name)
if (name && v) {
#endif
fprintf(cp_out, "%s = ", v->va_name);
wl_print(cp_varwl(v), cp_out);
wordlist *wltmp = cp_varwl(v);
wl_print(wltmp, cp_out);
wl_free(wltmp);
(void) putc('\n', cp_out);
yy = TRUE;
} else if (v) {