Free old strings after they have been expanded in format_choose.

This commit is contained in:
nicm 2019-03-29 09:33:24 +00:00 committed by Nicholas Marriott
parent 00fda57ddf
commit 92da105b58

View File

@ -1041,7 +1041,9 @@ format_choose(struct format_tree *ft, const char *s, char **left, char **right,
if (expand) {
*left = format_expand(ft, left0);
free(left0);
*right = format_expand(ft, right0);
free(right0);
} else {
*left = left0;
*right = right0;