diff options
Diffstat (limited to 'ask.c')
| -rw-r--r-- | ask.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -121,6 +121,7 @@ static int draw_line(FILE *out, const char *line, const char *patt, int cursor) } } if (backtrack) fprintf(out, "\033[0m\033[%dD", backtrack); + free(cache); return to_start; } @@ -292,6 +293,7 @@ static char *get_input(FILE *in, FILE *out, const char *prompt, const char *init if (backtrack || prompt[0]) fprintf(out, "\033[%dD", backtrack + (int)strlen(prompt)); fputs("\033[0m\033[K", out); + if (picked != buf && buf) free(buf); return picked; } |
