diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-06-06 23:47:35 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-06-06 23:47:35 -0700 |
| commit | 274ee7b8b1b6ea7ba3fc85fcdb7ec3a3259dd846 (patch) | |
| tree | c9c479aeafc6fbb26f05b5a49e7b184e7f61ac40 /ask.c | |
| parent | 88ed75a56bfebbaa9c5c023ebe2e03664106edbc (diff) | |
Freed some memory that wasn't being freed and disabled some safety
checks
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; } |
