(process_linenos): free the previously allocated subfile name, then
authorK. Richard Pixley <rich@cygnus>
Sat, 13 Feb 1993 01:40:33 +0000 (01:40 +0000)
committerK. Richard Pixley <rich@cygnus>
Sat, 13 Feb 1993 01:40:33 +0000 (01:40 +0000)
allocate the new one from the heap.

gdb/ChangeLog
gdb/xcoffread.c

index cdd7d07d98f519aba5c7f681c82ee4c7b3f7696e..9cf6684c3414a3457bf7ed3ca59000e00b4e3819 100644 (file)
@@ -3,6 +3,8 @@ Fri Feb 12 15:46:49 1993  K. Richard Pixley  (rich@cygnus.com)
        * xcoffread.c (process_xcoff_symbol, read_symbol_lineno): complain
          expects a pointer to complaint rather than a complaint
          structure.
+         (process_linenos): free the previously allocated subfile name,
+         then allocate the new one from the heap.
 
 Fri Feb 12 08:06:05 1993  Steve Chamberlain  (sac@thepub.cygnus.com)
 
index 892adb5f8f621f50c5ae2c4b4fc34a75843e6974..f7fc30d9941cff6768433c7871bc2c50ddc7338b 100644 (file)
@@ -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 *)