Skip to content

Commit

Permalink
pythonGH-94644: fix test_curses ref leak (pythonGH-94647)
Browse files Browse the repository at this point in the history
(cherry picked from commit 277f55c)

Co-authored-by: Kumar Aditya <[email protected]>
  • Loading branch information
kumaraditya303 authored and miss-islington committed Jul 7, 2022
1 parent 663aa6e commit 52992ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ PyCurses_ConvertToString(PyCursesWindowObject *win, PyObject *obj,
return 0;
/* check for embedded null bytes */
if (PyBytes_AsStringAndSize(*bytes, &str, NULL) < 0) {
Py_CLEAR(*bytes);
return 0;
}
return 1;
Expand Down

0 comments on commit 52992ad

Please sign in to comment.