2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>

* kern/env.c (grub_env_context_close): Fix memory leaks.
This commit is contained in:
okuji 2009-03-22 10:38:19 +00:00
parent f04f02e496
commit b28bbc4ef5
2 changed files with 8 additions and 1 deletions

View file

@ -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>
* normal/main.c (grub_normal_execute): Added an argument

View file

@ -1,7 +1,7 @@
/* env.c - Environment variables */
/*
* 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
* 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)
{
q = p->next;
grub_free (p->name);
if (p->type != GRUB_ENV_VAR_DATA)
grub_free (p->value);
grub_free (p);
}
}