Freeing the lists with functions and shortcuts upon exit.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4872 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-05-13 18:06:09 +00:00
parent 2088bfd45d
commit 24bc59f5c2
2 changed files with 14 additions and 1 deletions

View File

@ -2,6 +2,8 @@
* src/text.c (do_linter): Make an error message somewhat clearer.
* src/rcfile.c (parse_binding): Improve another error message.
* doc/syntax/nanorc.nanorc: Show key names like M-6 and M-/ as valid.
* src/global.c (thanks_for_all_the_fish): Upon exit also free the
lists with functions and shortcuts.
2014-05-12 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_spell): Provide startup feedback, as for the linter.

View File

@ -666,7 +666,7 @@ void shortcut_init(void)
while (allfuncs != NULL) {
subnfunc *f = allfuncs;
allfuncs = (allfuncs)->next;
allfuncs = allfuncs->next;
free(f);
}
@ -1681,6 +1681,17 @@ void thanks_for_all_the_fish(void)
if (replaceage != NULL)
free_filestruct(replaceage);
#endif
/* Free the functions and shortcuts lists. */
while (allfuncs != NULL) {
subnfunc *f = allfuncs;
allfuncs = allfuncs->next;
free(f);
}
while (sclist != NULL) {
subnfunc *f = sclist;
sclist = sclist->next;
free(f);
}
#ifndef DISABLE_NANORC
if (homedir != NULL)
free(homedir);