This fixes Savannah bug #46796.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5631
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2016-02-11 Benno Schulenberg <bensberg@justemail.net>
+ * src/text.c (do_linter): Go to the next item in the list before
+ freeing the current one. This fixes Savannah bug #46796.
+
2016-02-10 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (discard_until): Prevent a chain of editing actions from
continuing after a discard. This fixes Savannah bug #47104.
#ifndef NANO_TINY
free_lints_and_return:
#endif
- for (tmplint = lints; tmplint != NULL; tmplint = tmplint->next) {
+ for (curlint = lints; curlint != NULL;) {
+ tmplint = curlint;
+ curlint = curlint->next;
free(tmplint->msg);
free(tmplint->filename);
free(tmplint);