From c59bdff70987facd0309f69df621c9dfcff3044b Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 27 Jun 2012 19:37:40 +0200 Subject: [PATCH] * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if it's equal to currnode. This can happen with "" symlink. --- ChangeLog | 5 +++++ grub-core/fs/fshelp.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e110b318b..30013844f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-27 Vladimir Serbinenko + + * 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 * util/grub-mkconfig_lib.in: Fix print messages replacing builtin diff --git a/grub-core/fs/fshelp.c b/grub-core/fs/fshelp.c index 1cb9fcf12..21a72de84 100644 --- a/grub-core/fs/fshelp.c +++ b/grub-core/fs/fshelp.c @@ -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')