Two memory leaks found interactively with valgrind with safe fixes.

This commit is contained in:
Giles Atkinson 2022-05-10 08:28:19 +01:00 committed by Holger Vogt
parent 7511bef7d4
commit 40c2419a43
2 changed files with 3 additions and 0 deletions

View File

@ -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 */

View File

@ -1156,6 +1156,8 @@ void cp_vprint(void)
out_printf("( %s )\n", s);
else
out_printf("%s\n", s);
wl_free(wl);
tfree(s);
}
}