1
1

2011-02-22 Chris Allegretta <chrisa@asty.org>

* color.c (nfreeregex): Fix that we were trying to set the pointer passed by value
          to NULL.  Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4532 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Chris Allegretta 2011-02-23 03:09:23 +00:00
родитель 392c23c9c5
Коммит 154136a7cb
2 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -1,3 +1,7 @@
2011-02-22 Chris Allegretta <chrisa@asty.org>
* color.c (nfreeregex): Fix that we were trying to set the pointer passed by value
to NULL. Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune.
2011-02-18 Chris Allegretta <chrisa@asty.org>
* New saved cursor position history option. Command line option -P or --poslog, rc file
entry "poslog". Search history changes to ~/.nano/search_history, cursor position log
@ -7,7 +11,7 @@
4.15 discussing the change and offering an interoperability workaround.
* files.c (load_history): Set last_search to the last search value we loaded from history,
so do_research will succeed without needing to manually load the last seach in. Fixes
bug reported by Matt "ML" at gmail.
bug reported by Matthieu Lejeune.
2011-02-12 Chris Allegretta <chrisa@asty.org>
* Initial libmagic implementation, adapted from Eitan Adler <eitanadlerlist@gmail.com>.

Просмотреть файл

@ -108,13 +108,13 @@ void color_init(void)
}
/* Cleanup a regex we previously compiled */
void nfreeregex(regex_t *r)
void nfreeregex(regex_t **r)
{
assert(r != NULL);
regfree(r);
free(r);
r = NULL;
regfree(*r);
free(*r);
*r = NULL;
}
/* Update the color information based on the current filename. */
@ -219,7 +219,7 @@ void color_update(void)
/* Decompile e->ext_regex's specified regex if we aren't
* going to use it. */
if (not_compiled)
nfreeregex(e->ext);
nfreeregex(&e->ext);
}
}
@ -251,7 +251,7 @@ void color_update(void)
}
if (not_compiled)
nfreeregex(e->ext);
nfreeregex(&e->ext);
}
}
}
@ -292,7 +292,7 @@ void color_update(void)
/* Decompile e->ext_regex's specified regex if we aren't
* going to use it. */
if (not_compiled)
nfreeregex(e->ext);
nfreeregex(&e->ext);
}
}
}