aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-07 19:50:22 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-07 19:50:22 +0000
commit0350914acfaf4b21584a44262cd13b6a35bfce10 (patch)
tree010fc6562a1101667f75d704f0cee0e9a44f6a39
parent69feea6fe71f6cde3dd8026a7f396eaac2f8ab2f (diff)
downloadgdb-0350914acfaf4b21584a44262cd13b6a35bfce10.zip
gdb-0350914acfaf4b21584a44262cd13b6a35bfce10.tar.gz
gdb-0350914acfaf4b21584a44262cd13b6a35bfce10.tar.bz2
2011-03-05 Michael Snyder <msnyder@vmware.com>
* mi/mi-cmd-env.c (_initialize_mi_cmd_env): Free environment.
-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);
}