aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile-cplus-templates.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2017-08-17 13:58:01 -0700
committerKeith Seitz <keiths@redhat.com>2017-08-17 13:58:01 -0700
commitb5f28d7abc02ca509e389fa932d725cf111e4b40 (patch)
tree57a0dc0feaff890630a6ba2c9fab811d56b1f9cf /gdb/compile/compile-cplus-templates.c
parent2a95a158fae932f758d75a1178a40d4cc4804ff0 (diff)
parent1a457753cfad05989574c671a221ffce2d5df703 (diff)
downloadbinutils-users/pmuldoon/c++compile.zip
binutils-users/pmuldoon/c++compile.tar.gz
binutils-users/pmuldoon/c++compile.tar.bz2
Problems: gdb/compile/compile.c gdb/cp-support.c gdb/cp-support.h gdb/gdbtypes.h gdb/language.c gdb/linespec.c
Diffstat (limited to 'gdb/compile/compile-cplus-templates.c')
-rw-r--r--gdb/compile/compile-cplus-templates.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/compile/compile-cplus-templates.c b/gdb/compile/compile-cplus-templates.c
index 4b2bf46..b3d0794 100644
--- a/gdb/compile/compile-cplus-templates.c
+++ b/gdb/compile/compile-cplus-templates.c
@@ -591,12 +591,10 @@ print_conversion_node (const struct demangle_component *comp,
case DEMANGLE_COMPONENT_QUAL_NAME:
{
/* Print out the qualified name. */
- struct cleanup *back_to;
- char *ret = cp_comp_to_string (d_left (comp), 10);
+ gdb::unique_xmalloc_ptr<char> ret
+ = cp_comp_to_string (d_left (comp), 10);
- back_to = make_cleanup (xfree, ret);
- fprintf_unfiltered (stream, "%s::", ret);
- do_cleanups (back_to);
+ fprintf_unfiltered (stream, "%s::", ret.get ());
/* Follow the rest of the name. */
comp = d_right (comp);