mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
GH-94644: fix test_curses ref leak (GH-94647)
(cherry picked from commit 277f55cb04
)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
parent
65c431685b
commit
77a015387b
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue