GH-94644: fix test_curses ref leak (GH-94647)
This commit is contained in:
parent
9c60b25a0d
commit
277f55cb04
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user