mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #18408: parsetok() must not write into stderr on memory allocation error
The caller gets an error code and can raise a classic Python exception.
This commit is contained in:
parent
6b64a6803e
commit
3bf5f530d9
1 changed files with 0 additions and 1 deletions
|
|
@ -178,7 +178,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
|||
len = b - a; /* XXX this may compute NULL - NULL */
|
||||
str = (char *) PyObject_MALLOC(len + 1);
|
||||
if (str == NULL) {
|
||||
fprintf(stderr, "no mem for next token\n");
|
||||
err_ret->error = E_NOMEM;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue