]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/gettext/gettext.c (grub_gettext_init_ext): Avoid using
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 30 Sep 2010 19:07:51 +0000 (21:07 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 30 Sep 2010 19:07:51 +0000 (21:07 +0200)
mo_file after freeing.

ChangeLog
grub-core/gettext/gettext.c

index c223a869cf8c232a87da74ead5098fc916cffa67..0f0b6582779cc99fc3c6713bfc90c1af9e637fcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 2f94ac030fa1a04c3664c2423e4ef77927e5b992..9ab4c3b8dfff19f97c0b55e3a262fac1a772eac7 100644 (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);