Commit 6a8af9ab authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #25745: Fixed leaking a userptr in curses panel destructor.

parents 3e99fdee df40b623
......@@ -268,6 +268,8 @@ Core and Builtins
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
......
......@@ -220,6 +220,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment