[issue18113] Memory leak in curses.panel

Serhiy Storchaka report at bugs.python.org
Mon Jun 17 16:06:28 CEST 2013


Serhiy Storchaka added the comment:

> I've attached a new version of the patch that does this check, and also adds a test.

You are right. Your patch LGTM.

> (OTOH, looking at the ncurses 5.9 source code, set_panel_userptr() only returns an error if the panel object is NULL, which should never happen because Python reports an error if the panel creation fails.  So maybe the rc == ERR check is pointless.)

Future versions or alternative implementations can returns an error in other circumstances.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18113>
_______________________________________


More information about the Python-bugs-list mailing list