]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 27 Jun 2012 17:37:40 +0000 (19:37 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 27 Jun 2012 17:37:40 +0000 (19:37 +0200)
it's equal to currnode. This can happen with "" symlink.

ChangeLog
grub-core/fs/fshelp.c

index e110b318b5b014afc75a29916ced71b3392c97eb..30013844f83c867c06df80e2dfcefda644864478 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-27  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if
+       it's equal to currnode. This can happen with "" symlink.
+
 2012-06-27  Yves Blusseau <blusseau@zetam.org>
 
        * util/grub-mkconfig_lib.in: Fix print messages replacing builtin
index 1cb9fcf12a85805b4baaeccede300208b3224148..21a72de841c8e3d045632ff72ab52481d79519b7 100644 (file)
@@ -189,7 +189,8 @@ grub_fshelp_find_file (const char *path, grub_fshelp_node_t rootnode,
                }
            }
 
-         free_node (oldnode);
+         if (oldnode != currnode)
+           free_node (oldnode);
 
          /* Found the node!  */
          if (! next || *next == '\0')