commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2041] 2009-03-22 Yoshinori K.


From: Yoshinori K. Okuji
Subject: [2041] 2009-03-22 Yoshinori K.
Date: Sun, 22 Mar 2009 10:38:20 +0000

Revision: 2041
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2041
Author:   okuji
Date:     2009-03-22 10:38:19 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
2009-03-22  Yoshinori K. Okuji  <address@hidden>

    * kern/env.c (grub_env_context_close): Fix memory leaks.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/kern/env.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-03-22 10:05:31 UTC (rev 2040)
+++ trunk/grub2/ChangeLog       2009-03-22 10:38:19 UTC (rev 2041)
@@ -1,5 +1,9 @@
 2009-03-22  Yoshinori K. Okuji  <address@hidden>
 
+       * kern/env.c (grub_env_context_close): Fix memory leaks.
+
+2009-03-22  Yoshinori K. Okuji  <address@hidden>
+
        * normal/main.c (grub_normal_execute): Added an argument
        BATCH to specify if an interactive interface should be provided
        after reading a config file.

Modified: trunk/grub2/kern/env.c
===================================================================
--- trunk/grub2/kern/env.c      2009-03-22 10:05:31 UTC (rev 2040)
+++ trunk/grub2/kern/env.c      2009-03-22 10:38:19 UTC (rev 2041)
@@ -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 @@
       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);
        }
     }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]