[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
leak in command_word_completion_function
From: |
Grisha Levit |
Subject: |
leak in command_word_completion_function |
Date: |
Fri, 7 Jul 2023 17:35:26 -0400 |
If there a glob is expanded to more than one result while attempting
to complete the command word, the matches are discarded but not freed.
diff --git a/bashline.c b/bashline.c
index 0e5373ab..07f38e62 100644
--- a/bashline.c
+++ b/bashline.c
@@ -2192,7 +2192,11 @@ globword:
local_index = 0;
if (glob_matches[1] && rl_completion_type == TAB) /* multiple
matches are bad */
- return ((char *)NULL);
+ {
+ strvec_dispose (glob_matches);
+ glob_matches = (char **)NULL;
+ return ((char *)NULL);
+ }
}
- leak in command_word_completion_function,
Grisha Levit <=