diff --git a/src/frontend/arg.c b/src/frontend/arg.c index bb79bc016..ec3f16198 100644 --- a/src/frontend/arg.c +++ b/src/frontend/arg.c @@ -133,6 +133,7 @@ static void common(const char *string, const struct wordlist *wl, w = process(w); /* O.K. now call fn */ command->co_func(w); + wl_free(w); } } /* end of function common */ diff --git a/src/frontend/variable.c b/src/frontend/variable.c index a1027f192..4b29b0dd3 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -1156,6 +1156,8 @@ void cp_vprint(void) out_printf("( %s )\n", s); else out_printf("%s\n", s); + wl_free(wl); + tfree(s); } }