aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index b7524e7..23da5f9 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1654,12 +1654,8 @@ again:
std::string new_name = cp_canonicalize_string (name);
if (!new_name.empty ())
- {
- type_name
- = (char *) obstack_copy0 (&objfile->objfile_obstack,
- new_name.c_str (),
- new_name.length ());
- }
+ type_name = obstack_strdup (&objfile->objfile_obstack,
+ new_name);
}
if (type_name == NULL)
{