aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r--gdb/python/py-unwind.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 92ce138..64c3123 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -236,12 +236,9 @@ unwind_infopy_str (PyObject *self)
}
fprintf_unfiltered (strfile, ")");
}
- {
- char *s = ui_file_xstrdup (strfile, NULL);
- result = PyString_FromString (s);
- xfree (s);
- }
+ std::string s = ui_file_as_string (strfile);
+ result = PyString_FromString (s.c_str ());
ui_file_delete (strfile);
return result;
}