Avoid leak when spell-correcting an empty line. --- bashline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bashline.c b/bashline.c index 525d065a..528f56e0 100644 --- a/bashline.c +++ b/bashline.c @@ -1348,7 +1348,10 @@ bash_spell_correct_shellword (int count, int key) text = rl_copy_text (wbeg, wend); if (text == 0 || *text == 0) - break; + { + FREE (text); + break; + } newdir = dirspell (text); if (newdir) -- 2.45.1