2005-12-25 Marco Gerards <marco@gnu.org>
* kern/env.c (grub_env_set): Rewritten the error handling code.
This commit is contained in:
parent
4750f5f13d
commit
0708445662
2 changed files with 11 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-12-25 Marco Gerards <marco@gnu.org>
|
||||
|
||||
* kern/env.c (grub_env_set): Rewritten the error handling code.
|
||||
|
||||
2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
* geninit.sh: Made more robust, and more portable.
|
||||
|
|
15
kern/env.c
15
kern/env.c
|
@ -123,15 +123,14 @@ grub_env_set (const char *var, const char *val)
|
|||
sort->sort_prevp = &env->sort_next;
|
||||
*sortp = env;
|
||||
|
||||
fail:
|
||||
if (grub_errno)
|
||||
{
|
||||
grub_free (env->name);
|
||||
grub_free (env->value);
|
||||
grub_free (env);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
grub_free (env->name);
|
||||
grub_free (env->value);
|
||||
grub_free (env);
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
Loading…
Add table
Reference in a new issue