gdb/varobj.c: Fix leak
authorPedro Alves <palves@redhat.com>
Tue, 31 Jan 2017 17:56:36 +0000 (17:56 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 31 Jan 2017 23:34:14 +0000 (23:34 +0000)
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.

gdb/ChangeLog
gdb/varobj.c

index 3e86d550663c21cd05845856104bdeca2b0d0432..5e822f81a462edbf39d32584ce197075dbd97d7d 100644 (file)
@@ -1,3 +1,7 @@
+2017-01-31  Pedro Alves  <palves@redhat.com>
+
+       * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
+
 2017-01-31  Pedro Alves  <palves@redhat.com>
 
        * common/scoped_restore.h
index 30dfb862d52aae1dc5af45235e33aa69b40a6606..bcca6c6efb8d5712beaab186ac9890221fd51c2f 100644 (file)
@@ -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))
This page took 0.036631 seconds and 4 git commands to generate.