mirror of
https://github.com/python/cpython
synced 2024-09-16 00:48:28 +00:00
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…
Reference in a new issue