2006-12-12 Marco Gerards <marco@gnu.org>
* include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'. * kern/env.c (grub_env_unset): Don't free the member `value' when the type is GRUB_ENV_VAR_DATA, in this case it's a user defined pointer. * normal/main.c (current_menu): Removed. (free_menu): Unset the `menu' environment variable. (grub_normal_menu_addentry): Make use of the environment variable `menu', instead of using the global `current_menu'. Allocate memory for the sourcecode of this entry. (read_config_file): New argument `nested', changed all callers. Only in the case of a new context, initialize a new menu. Set the `menu' environment variable. (grub_normal_execute): Don't set and unset the environment variable `menu' here anymore. Only free the menu when leaving the context. * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory leak.
This commit is contained in:
parent
957b3a3e17
commit
a8aa57628e
5 changed files with 69 additions and 29 deletions
|
@ -261,7 +261,8 @@ grub_env_unset (const char *name)
|
|||
grub_env_remove (var);
|
||||
|
||||
grub_free (var->name);
|
||||
grub_free (var->value);
|
||||
if (var->type != GRUB_ENV_VAR_DATA)
|
||||
grub_free (var->value);
|
||||
grub_free (var);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue