Issue #25745: Fixed leaking a userptr in curses panel destructor.
This commit is contained in:
parent
3111c94b16
commit
22d8942b8d
|
@ -77,7 +77,7 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #26881: modulefinder now works with bytecode with extended args.
|
||||
- Issue #25745: Fixed leaking a userptr in curses panel destructor.
|
||||
|
||||
- Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
|
||||
Patch by Georg Brandl.
|
||||
|
|
|
@ -191,6 +191,11 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo)
|
|||
static void
|
||||
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
|
||||
{
|
||||
PyObject *obj = (PyObject *) panel_userptr(po->pan);
|
||||
if (obj) {
|
||||
(void)set_panel_userptr(po->pan, NULL);
|
||||
Py_DECREF(obj);
|
||||
}
|
||||
(void)del_panel(po->pan);
|
||||
if (po->wo != NULL) {
|
||||
Py_DECREF(po->wo);
|
||||
|
|
Loading…
Reference in New Issue