gh-145376: Fix various refleaks Objects/#145609
Conversation
Modules/_cursesmodule.c
Outdated
| attr_old = getattrs(self->win); | ||
| if (curses_wattrset(self, attr, "addstr") < 0) { | ||
| curses_release_wstr(strtype, wstr); | ||
| Py_DECREF(bytesobj); |
There was a problem hiding this comment.
Be careful here. PyCurses_ConvertToString has a weird return type so you might not necessarily have bytesobj set to something (it might be in wstr instead).
Objects/typevarobject.c
Outdated
There was a problem hiding this comment.
Could you move this line after the if instead so we don't have to worry about cleaning up the ref?
vstinner
left a comment
There was a problem hiding this comment.
I check all changes and they LGTM.
|
Merged. Thans for the fix. |
|
|
|
Oh, macOS and FreeBSD fail to build
I wrote #145669 to fix it. |
|
Uh oh!
There was an error while loading. Please reload this page.