diff --git a/ChangeLog b/ChangeLog index c223a869c..0f0b65827 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-09-30 Vladimir Serbinenko + + * grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using + mo_file after freeing. + 2010-09-30 Vladimir Serbinenko * grub-core/normal/term.c (read_terminal_list): Free in a right order. diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c index 2f94ac030..9ab4c3b8d 100644 --- a/grub-core/gettext/gettext.c +++ b/grub-core/gettext/gettext.c @@ -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);