mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 18:52:35 +02:00
fix for -c command ending with backslash; fix several small memory leaks; fix several uninitialized variables; compgen -V fix
This commit is contained in:
@@ -2868,7 +2868,7 @@ rl_menu_complete (int count, int ignore)
|
||||
if (rl_completion_query_items > 0 && match_list_size >= rl_completion_query_items)
|
||||
{
|
||||
rl_ding ();
|
||||
FREE (matches);
|
||||
_rl_free_match_list (matches);
|
||||
matches = (char **)0;
|
||||
full_completion = 1;
|
||||
return (0);
|
||||
|
||||
@@ -249,6 +249,7 @@ rl_gather_tyi (void)
|
||||
struct timeval timeout;
|
||||
#endif
|
||||
|
||||
result = -1;
|
||||
chars_avail = 0;
|
||||
input = 0;
|
||||
tty = fileno (rl_instream);
|
||||
|
||||
+1
-1
@@ -779,7 +779,7 @@ _rl_read_bracketed_paste_prefix (int c)
|
||||
pbpref = BRACK_PASTE_PREF; /* XXX - debugging */
|
||||
if (c != pbpref[0])
|
||||
return (0);
|
||||
pbuf[ind = 0] = c;
|
||||
pbuf[ind = 0] = key = c;
|
||||
while (ind < BRACK_PASTE_SLEN-1 &&
|
||||
(RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) &&
|
||||
_rl_pushed_input_available () == 0 &&
|
||||
|
||||
+5
-1
@@ -55,7 +55,11 @@ anonopen (const char *name, int flags, char **fn)
|
||||
/* "Names do not affect the behavior of the file descriptor." */
|
||||
fd = memfd_create ("anonopen", 0);
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
{
|
||||
if (fn)
|
||||
*fn = 0;
|
||||
return fd;
|
||||
}
|
||||
/* If memfd_create fails, we fall through to the unlinked-regular-file
|
||||
implementation. */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user