commit bash-20041202 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:40:44 -05:00
parent 54cdd75ae4
commit 76a8d78dfd
9 changed files with 91 additions and 50 deletions
+6 -2
View File
@@ -225,8 +225,10 @@ _rl_free_history_entry (entry)
{
if (entry == 0)
return;
if (entry->line)
free (entry->line);
FREE (entry->line);
FREE (entry->timestamp);
free (entry);
}
@@ -242,6 +244,7 @@ rl_maybe_replace_line ()
{
temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
free (temp->line);
FREE (temp->timestamp);
free (temp);
}
return 0;
@@ -274,6 +277,7 @@ rl_maybe_save_line ()
{
_rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
_rl_saved_line_for_history->timestamp = (char *)NULL;
_rl_saved_line_for_history->data = (char *)rl_undo_list;
}