From: Andrew Burgess Date: Fri, 5 Jun 2020 20:07:58 +0000 (+0100) Subject: Revert "gdb/python: Avoid use after free in py-tui.c" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=940dace9cff6f44e051632e12b51cef23f19de1f;p=binutils-gdb.git Revert "gdb/python: Avoid use after free in py-tui.c" This reverts commit 982a38f60b0ece9385556cff45567e06710478cb. I missed that the title being assigned too was a std::string, and so there is no leak. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1d486c4b300..5cd74e6c31b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-06-05 Andrew Burgess + + Revert commit 982a38f60b0. + * python/py-tui.c (gdbpy_tui_set_title): Restore use of get. + 2020-06-05 Andrew Burgess * python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c index f2c03395a0b..ca88f85eb9f 100644 --- a/gdb/python/py-tui.c +++ b/gdb/python/py-tui.c @@ -433,7 +433,7 @@ gdbpy_tui_set_title (PyObject *self, PyObject *newvalue, void *closure) if (value == nullptr) return -1; - win->window->title = value.release (); + win->window->title = value.get (); return 0; }