mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 04:41:21 +03:00
Freeing the position-history records that are dropped.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
b8e0e22d64
commit
65efed5f97
@ -9,6 +9,7 @@
|
||||
* AUTHORS, THANKS: Remove SVN Id tags and a duplication.
|
||||
* src/winio.c (get_kbinput), src/nano.c (main): Switch the cursor on
|
||||
in the right place: in the central input routine.
|
||||
* src/files.c (load_poshistory): Free any records that are dropped.
|
||||
|
||||
2016-02-09 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/files.c (stat_with_alloc, open_buffer, write_file): Check the
|
||||
|
@ -3323,8 +3323,14 @@ void load_poshistory(void)
|
||||
record_ptr = newrecord;
|
||||
|
||||
/* Impose a limit, so the file will not grow indefinitely. */
|
||||
if (++count > 200)
|
||||
if (++count > 200) {
|
||||
poshiststruct *drop_record = position_history;
|
||||
|
||||
position_history = position_history->next;
|
||||
|
||||
free(drop_record->filename);
|
||||
free(drop_record);
|
||||
}
|
||||
}
|
||||
fclose(hist);
|
||||
free(line);
|
||||
|
Loading…
Reference in New Issue
Block a user