]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2004-12-13 Marco Gerards <metgerards@student.han.nl>
authormarco_g <marco_g@localhost>
Mon, 13 Dec 2004 17:26:17 +0000 (17:26 +0000)
committermarco_g <marco_g@localhost>
Mon, 13 Dec 2004 17:26:17 +0000 (17:26 +0000)
* fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
(grub_ext2_dir): Likewise.  Don't return in case of an error, jump
to fail instead.  Reported by Vincent Pelletier
<subdino2004@yahoo.fr>.

* fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
it is not allocated.  Reported by Vincent Pelletier
<subdino2004@yahoo.fr>.

* normal/cmdline.c (grub_tab_complete): Add a blank line to the
output so the output looks better.

ChangeLog
fs/ext2.c
fs/fshelp.c
normal/cmdline.c

index e58edb321ae691ccbe9253581a2e2b526ed20c2a..27e51cec1b46b0ed19473cc58e621cfa1d930dbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2004-12-13  Marco Gerards  <metgerards@student.han.nl>
+
+       * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
+       (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
+       to fail instead.  Reported by Vincent Pelletier
+       <subdino2004@yahoo.fr>.
+
+       * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
+       it is not allocated.  Reported by Vincent Pelletier
+       <subdino2004@yahoo.fr>.
+
+       * normal/cmdline.c (grub_tab_complete): Add a blank line to the
+       output so the output looks better.
+       
 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
 
        Modulize the partition map support and add support for the amiga
index 056f38ac11d73b0d0fc9c59c680b66f7ca6257b8..56f583aada1350fa4bc37aa3d2729f88e3e0aeb5 100644 (file)
--- a/fs/ext2.c
+++ b/fs/ext2.c
@@ -509,9 +509,9 @@ grub_ext2_open (struct grub_file *file, const char *name)
   return 0;
 
  fail:
-  grub_free (data);
   if (fdiro != &data->diropen)
     grub_free (fdiro);
+  grub_free (data);
   
 #ifndef GRUB_UTIL
   grub_dl_unref (my_mod);
@@ -580,14 +580,14 @@ grub_ext2_dir (grub_device_t device, const char *path,
   grub_fshelp_find_file (path, &data->diropen, &fdiro, grub_ext2_iterate_dir,
                         grub_ext2_read_symlink, GRUB_FSHELP_DIR);
   if (grub_errno)
-    return grub_errno;
+    goto fail;
   
   grub_ext2_iterate_dir (fdiro, iterate);
   
  fail:
-  grub_free (data);
   if (fdiro != &data->diropen)
     grub_free (fdiro);
+  grub_free (data);
 
 #ifndef GRUB_UTIL
   grub_dl_unref (my_mod);
index bc838d223459ccd0258e84ed1187bd16d05db66b..af2f2b457c2cefb91834aeaa281dc1ed55eb3d9e 100644 (file)
@@ -130,10 +130,8 @@ grub_fshelp_find_file (const char *path, grub_fshelp_node_t rootnode,
          
          /* Iterate over the directory.  */
          found = iterate_dir (currnode, iterate);
-         
          if (!found)
            {
-             free_node (oldnode);
              if (grub_errno)
                return grub_errno;
              
index f8a3395057b9fe3f508189f587af57e330ce1b76..dc9d68bc38be955fe5b96ee0cd199bf3530b065c 100644 (file)
@@ -205,7 +205,7 @@ grub_tab_complete (char *buf, int *restore)
          /* Multiple matches found, print the first instead of completing.  */
          else if (numfound == 2)
            {
-             grub_printf ("\nPossible %s are: ", what);
+             grub_printf ("\nPossible %s are:\n", what);
              print_completion (found);
            }