diff options
author | Doug Evans <xdje42@gmail.com> | 2014-11-18 09:00:15 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-11-18 09:00:15 -0800 |
commit | 98387a2917d136b1acbaa9229d5b6a787d9efd54 (patch) | |
tree | 2d449d0213da2d57c0589e2b15005356b7a40153 | |
parent | aff0895837de06af4e16b809d1f2eb17930297ad (diff) | |
download | binutils-gdb-98387a2917d136b1acbaa9229d5b6a787d9efd54.tar.gz |
Fix memory leak in watch_main_source_file_lossage.
gdb/ChangeLog:
* buildsym.c (watch_main_source_file_lossage): Fix memory leak.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/buildsym.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c17d517a08c..fd5fd697d24 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2014-11-18 Doug Evans <xdje42@gmail.com> + * buildsym.c (watch_main_source_file_lossage): Fix memory leak. + +2014-11-18 Doug Evans <xdje42@gmail.com> + * cp-namespace.c (cp_lookup_symbol_imports_or_template): Use SYMBOL_OBJFILE. * findvar.c (default_read_var_value): Ditto. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 3d92a85450f..3ea8ff0a901 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -989,6 +989,8 @@ watch_main_source_file_lossage (void) subfiles = mainsub_alias->next; else prev_mainsub_alias->next = mainsub_alias->next; + xfree (mainsub_alias->name); + xfree (mainsub_alias->dirname); xfree (mainsub_alias); } } |