aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorK. Richard Pixley <rich@cygnus>1993-02-13 01:40:33 +0000
committerK. Richard Pixley <rich@cygnus>1993-02-13 01:40:33 +0000
commit6d4ea3a54939bb89182b6def9263b5aa6b9afc52 (patch)
tree056aa6c880fc6968ea460a9dbd840d2c3ba47b38 /gdb/xcoffread.c
parente99163901e5c6fe8e6f3a388fe15a76fb6ea70ea (diff)
downloadgdb-6d4ea3a54939bb89182b6def9263b5aa6b9afc52.zip
gdb-6d4ea3a54939bb89182b6def9263b5aa6b9afc52.tar.gz
gdb-6d4ea3a54939bb89182b6def9263b5aa6b9afc52.tar.bz2
(process_linenos): free the previously allocated subfile name, then
allocate the new one from the heap.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 892adb5..f7fc30d 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -630,9 +630,8 @@ process_linenos (start, end)
/* start_subfile (inclTable[ii].name, (char*)0); */
start_subfile (" ?", (char*)0);
- current_subfile->name =
- obsavestring (inclTable[ii].name, strlen (inclTable[ii].name),
- &current_objfile->symbol_obstack);
+ free (current_subfile->name);
+ current_subfile->name = strdup (inclTable[ii].name);
if (lv == lineTb) {
current_subfile->line_vector = (struct linetable *)