aboutsummaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r--gdb/minsyms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 33560e3..5f4cf54 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -1473,10 +1473,11 @@ minimal_symbol_reader::install ()
if (!msym->name_set)
{
/* This will be freed later, by compute_and_set_names. */
- char *demangled_name
+ gdb::unique_xmalloc_ptr<char> demangled_name
= symbol_find_demangled_name (msym, msym->linkage_name ());
msym->set_demangled_name
- (demangled_name, &m_objfile->per_bfd->storage_obstack);
+ (demangled_name.release (),
+ &m_objfile->per_bfd->storage_obstack);
msym->name_set = 1;
}
/* This mangled_name_hash computation has to be outside of