Revert "gdb/python: Avoid use after free in py-tui.c"
This reverts commit 982a38f60b
.
I missed that the title being assigned too was a std::string, and so
there is no leak.
This commit is contained in:
parent
982a38f60b
commit
940dace9cf
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
|
Revert commit 982a38f60b0.
|
||||||
|
* python/py-tui.c (gdbpy_tui_set_title): Restore use of get.
|
||||||
|
|
||||||
2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
|
2020-06-05 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
|
* python/py-tui.c (gdbpy_tui_set_title): Use release, not get, to
|
||||||
|
|
|
@ -433,7 +433,7 @@ gdbpy_tui_set_title (PyObject *self, PyObject *newvalue, void *closure)
|
||||||
if (value == nullptr)
|
if (value == nullptr)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
win->window->title = value.release ();
|
win->window->title = value.get ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue