Commit 24bc59f5 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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
parent 2088bfd4
Showing with 14 additions and 1 deletion
+14 -1
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment