aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-18 09:00:15 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-18 09:00:15 -0800
commit98387a2917d136b1acbaa9229d5b6a787d9efd54 (patch)
tree2d449d0213da2d57c0589e2b15005356b7a40153 /gdb/buildsym.c
parentaff0895837de06af4e16b809d1f2eb17930297ad (diff)
downloadgdb-98387a2917d136b1acbaa9229d5b6a787d9efd54.zip
gdb-98387a2917d136b1acbaa9229d5b6a787d9efd54.tar.gz
gdb-98387a2917d136b1acbaa9229d5b6a787d9efd54.tar.bz2
Fix memory leak in watch_main_source_file_lossage.
gdb/ChangeLog: * buildsym.c (watch_main_source_file_lossage): Fix memory leak.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 3d92a85..3ea8ff0 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);
}
}