aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/mi/mi-cmd-env.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7f02c9b..8f7a58f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
2011-03-06 Michael Snyder <msnyder@vmware.com>
+ * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Free environment.
+
* elfread.c (elf_symtab_read): Stop memory leak.
* main.c (captured_main): Fix memory leak.
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index f77474b..ad34aac 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -279,4 +279,5 @@ _initialize_mi_cmd_env (void)
if (!env)
env = "";
orig_path = xstrdup (env);
+ free_environ (environment);
}