core: fix unlikely memory leak in completion

v2.8-utf8proc
Sébastien Helleu 2020-02-09 06:56:53 +01:00
parent 7fde75797c
commit 5edbeea338
2 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ New features::
Bug fixes::
* core: fix memory leak in completion
* core: flush stdout/stderr before forking in hook_process function (issue #1441)
* core: fix evaluation of condition with nested "if" (issue #1434)
* irc: fix crash when receiving a malformed message 324 (channel mode)

View File

@ -1320,6 +1320,8 @@ gui_completion_search (struct t_gui_completion *completion, int direction,
{
case GUI_COMPLETION_NULL:
/* should never be executed */
if (old_word_found)
free (old_word_found);
return;
case GUI_COMPLETION_COMMAND:
gui_completion_command (completion);