readline changes to use xfree; bumped version to bash-5.2-beta

This commit is contained in:
Chet Ramey
2022-04-08 11:03:02 -04:00
parent 505f60f94c
commit 0b9a4b3ae0
20 changed files with 939 additions and 774 deletions
-11
View File
@@ -388,23 +388,12 @@ _rl_free_saved_history_line (void)
{
if (rl_undo_list && rl_undo_list == (UNDO_LIST *)_rl_saved_line_for_history->data)
rl_undo_list = 0;
/* Have to free this separately because _rl_free_history entry can't:
it doesn't know whether or not this has application data. Only the
callers that know this is _rl_saved_line_for_history can know that
it's an undo list. */
#if defined (HISTORY_SEARCH_SETS_HISTPOS)
if (_rl_saved_line_for_history->data)
{
orig = rl_undo_list;
rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data;
rl_free_undo_list ();
rl_undo_list = orig;
}
#else
if (_rl_saved_line_for_history->data)
_rl_free_undo_list ((UNDO_LIST *)_rl_saved_line_for_history->data);
#endif
_rl_free_history_entry (_rl_saved_line_for_history);
_rl_saved_line_for_history = (HIST_ENTRY *)NULL;
}