From: Vladimir 'phcoder' Serbinenko Date: Wed, 27 Jun 2012 17:37:40 +0000 (+0200) Subject: * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if X-Git-Tag: 2.00~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c59bdff70987facd0309f69df621c9dfcff3044b;p=thirdparty%2Fgrub.git * grub-core/fs/fshelp.c (grub_fshelp_find_file): Don't free oldnode if it's equal to currnode. This can happen with "" symlink. --- 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')