From 0350914acfaf4b21584a44262cd13b6a35bfce10 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 7 Mar 2011 19:50:22 +0000 Subject: [PATCH] 2011-03-05 Michael Snyder * mi/mi-cmd-env.c (_initialize_mi_cmd_env): Free environment. --- gdb/ChangeLog | 2 ++ gdb/mi/mi-cmd-env.c | 1 + 2 files changed, 3 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7f02c9bdf11..8f7a58fb6dd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-03-06 Michael Snyder + * 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 f77474b40f1..ad34aacf569 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); } -- 2.30.2