Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Modules/_io/winconsoleio.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,12 +673,13 @@ read_console_w(HANDLE handle, DWORD maxlen, DWORD *readlen) {
maxlen += 1;
Py_BLOCK_THREADS
newbuf = (wchar_t*)PyMem_Realloc(buf, maxlen * sizeof(wchar_t));
Py_UNBLOCK_THREADS
if (!newbuf) {
sig = -1;
PyErr_NoMemory();
Py_UNBLOCK_THREADS
break;
}
Py_UNBLOCK_THREADS
buf = newbuf;
/* Only advance by n and not BUFSIZ in this case */
off += n;
Expand Down
Loading