Skip to content

Commit

Permalink
GH-94644: fix test_curses ref leak (GH-94647)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 authored Jul 7, 2022
1 parent 9c60b25 commit 277f55c
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 @@ -383,6 +383,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 277f55c

Please sign in to comment.