diff options
author | Pedro Alves <palves@redhat.com> | 2017-01-16 18:10:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-01-17 01:07:39 +0000 |
commit | cfd719ecd874d15e785d474ab16534da72aeba0c (patch) | |
tree | 60d59639cf0ff718ba826dd5ff03d2f7ae58f7ee | |
parent | c7164f340e2cc49c6b395a7ea63b1286151b6edb (diff) | |
download | binutils-gdb-cfd719ecd874d15e785d474ab16534da72aeba0c.tar.gz |
gdb/varobj.c: Fix leak
Whoops, this function returns a std::string.
gdb/ChangeLog:
2017-01-17 Pedro Alves <palves@redhat.com>
* varobj.c (varobj_value_get_print_value): Remove xstrdup call.
-rw-r--r-- | gdb/varobj.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index 30dfb862d52..bcca6c6efb8 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)) |