3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 02:19:26 +01:00

client: fix display completion leak

This commit is contained in:
Tim Kourt 2017-05-12 14:36:52 -07:00 committed by Denis Kenzior
parent 89351da35f
commit 305af40636

View File

@ -308,8 +308,11 @@ static void display_completion_matches(char **matches, int num_matches,
char line[LINE_LEN]; char line[LINE_LEN];
size_t index; size_t index;
size_t line_used; size_t line_used;
char *input = rl_copy_text(0, rl_end);
prompt = l_strdup_printf("%s%s\n", IWD_PROMPT, input);
l_free(input);
prompt = l_strdup_printf("%s%s\n", IWD_PROMPT, rl_copy_text(0, rl_end));
display_text(prompt); display_text(prompt);
l_free(prompt); l_free(prompt);