changeset: 101279:afed12943ddd branch: 3.5 parent: 101276:3579cdaf56d9 user: Serhiy Storchaka date: Mon May 09 00:11:59 2016 +0300 files: Misc/NEWS Modules/_curses_panel.c description: Issue #25745: Fixed leaking a userptr in curses panel destructor. diff -r 3579cdaf56d9 -r afed12943ddd Misc/NEWS --- a/Misc/NEWS Sun May 08 23:43:50 2016 +0300 +++ b/Misc/NEWS Mon May 09 00:11:59 2016 +0300 @@ -116,6 +116,8 @@ Library ------- +- Issue #25745: Fixed leaking a userptr in curses panel destructor. + - Issue #26881: The modulefinder module now supports extended opcode arguments. - Issue #23815: Fixed crashes related to directly created instances of types in diff -r 3579cdaf56d9 -r afed12943ddd Modules/_curses_panel.c --- a/Modules/_curses_panel.c Sun May 08 23:43:50 2016 +0300 +++ b/Modules/_curses_panel.c Mon May 09 00:11:59 2016 +0300 @@ -220,6 +220,11 @@ 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);