2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
* kern/env.c (grub_env_context_close): Fix memory leaks.
This commit is contained in:
parent
f04f02e496
commit
b28bbc4ef5
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* kern/env.c (grub_env_context_close): Fix memory leaks.
|
||||||
|
|
||||||
2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
|
2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
* normal/main.c (grub_normal_execute): Added an argument
|
* normal/main.c (grub_normal_execute): Added an argument
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* env.c - Environment variables */
|
/* env.c - Environment variables */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2003,2005,2006,2007,2008 Free Software Foundation, Inc.
|
* Copyright (C) 2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -127,6 +127,9 @@ grub_env_context_close (void)
|
||||||
for (p = current_context->vars[i]; p; p = q)
|
for (p = current_context->vars[i]; p; p = q)
|
||||||
{
|
{
|
||||||
q = p->next;
|
q = p->next;
|
||||||
|
grub_free (p->name);
|
||||||
|
if (p->type != GRUB_ENV_VAR_DATA)
|
||||||
|
grub_free (p->value);
|
||||||
grub_free (p);
|
grub_free (p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue