aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-02-16 17:36:29 -0700
committerTom Tromey <tom@tromey.com>2023-02-17 19:05:04 -0500
commitbe643e074f3081b537a11c87c1ccf1d400f2945e (patch)
tree898428fd0a1f6b943246c5737707925d6d3367c7 /gdb/dwarf2
parent22e1578cc831ab97a34d8bddcba73544a4fce6b8 (diff)
downloadgdb-be643e074f3081b537a11c87c1ccf1d400f2945e.zip
gdb-be643e074f3081b537a11c87c1ccf1d400f2945e.tar.gz
gdb-be643e074f3081b537a11c87c1ccf1d400f2945e.tar.bz2
Avoid manual memory management in go-lang.c
I noticed a couple of spots in go-lang.c that could be improved by using unique_ptr. Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index eb37c77..4fd46fd 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -5838,7 +5838,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
&& sym->aclass () == LOC_BLOCK)
{
gdb::unique_xmalloc_ptr<char> this_package_name
- (go_symbol_package_name (sym));
+ = go_symbol_package_name (sym);
if (this_package_name == NULL)
continue;