2005-12-25 Marco Gerards <marco@gnu.org>

* kern/env.c (grub_env_set): Rewritten the error handling code.
This commit is contained in:
marco_g 2005-12-25 17:19:24 +00:00
parent 4750f5f13d
commit 0708445662
2 changed files with 11 additions and 8 deletions

View file

@ -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.

View file

@ -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 *