* grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using

mo_file after freeing.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-30 21:07:51 +02:00
parent e6d983ba6d
commit 6e3c515d5b
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-09-30 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using
mo_file after freeing.
2010-09-30 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/term.c (read_terminal_list): Free in a right order.

View File

@ -287,8 +287,10 @@ grub_gettext_init_ext (const char *lang)
/* Will try adding .gz as well. */
if (fd_mo == NULL)
{
grub_free (mo_file);
char *mo_file_old;
mo_file_old = mo_file;
mo_file = grub_xasprintf ("%s.gz", mo_file);
grub_free (mo_file_old);
if (!mo_file)
return;
fd_mo = grub_mofile_open (mo_file);