aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-01-31 17:56:36 +0000
committerPedro Alves <palves@redhat.com>2017-01-31 23:34:14 +0000
commitb47413b47e103677fedb7cd1301c62fee01ac4ba (patch)
treeca576e31a0df4506f1e51b40c64ea1002b8b621e /gdb/varobj.c
parent60adb36c08942fd4a2f8bf598864254c043668a1 (diff)
downloadgdb-b47413b47e103677fedb7cd1301c62fee01ac4ba.zip
gdb-b47413b47e103677fedb7cd1301c62fee01ac4ba.tar.gz
gdb-b47413b47e103677fedb7cd1301c62fee01ac4ba.tar.bz2
gdb/varobj.c: Fix leak
Whoops, this function returns a std::string. gdb/ChangeLog: 2017-01-31 Pedro Alves <palves@redhat.com> * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 30dfb86..bcca6c6 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2432,7 +2432,7 @@ varobj_value_get_print_value (struct value *value,
if (dynamic_varobj_has_child_method (var))
{
do_cleanups (old_chain);
- return xstrdup ("{...}");
+ return "{...}";
}
if (PyObject_HasAttr (value_formatter, gdbpy_to_string_cst))