mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/fs/fshelp.c (find_file): Set oldnode to zero after
freeing it.
This commit is contained in:
1 parent
66a93674b2
commit
3f078c0fca
2 files changed
+12
-1
No files matched your search
@@ -1,3 +1,8 @@
|
||||
2013-02-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/fshelp.c (find_file): Set oldnode to zero after
|
||||
freeing it.
|
||||
|
||||
2013-02-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Implement USBDebug (full USB stack variant).
|
||||
|
||||
@@ -147,6 +147,7 @@ find_file (const char *currpath, grub_fshelp_node_t currroot,
|
||||
free_node (ctx->currnode, ctx);
|
||||
free_node (ctx->oldnode, ctx);
|
||||
ctx->currnode = 0;
|
||||
ctx->oldnode = 0;
|
||||
return grub_error (GRUB_ERR_SYMLINK_LOOP,
|
||||
N_("too deep nesting of symlinks"));
|
||||
}
|
||||
@@ -158,6 +159,7 @@ find_file (const char *currpath, grub_fshelp_node_t currroot,
|
||||
if (!symlink)
|
||||
{
|
||||
free_node (ctx->oldnode, ctx);
|
||||
ctx->oldnode = 0;
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
@@ -177,12 +179,16 @@ find_file (const char *currpath, grub_fshelp_node_t currroot,
|
||||
if (grub_errno)
|
||||
{
|
||||
free_node (ctx->oldnode, ctx);
|
||||
ctx->oldnode = 0;
|
||||
return grub_errno;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->oldnode != ctx->currnode)
|
||||
free_node (ctx->oldnode, ctx);
|
||||
{
|
||||
free_node (ctx->oldnode, ctx);
|
||||
ctx->oldnode = 0;
|
||||
}
|
||||
|
||||
/* Found the node! */
|
||||
if (! next || *next == '\0')
|
||||
|
||||
Reference in new issue
Block a user