mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
71c8b7ec04
commit
526daabf34
1 changed files with 0 additions and 1 deletions
|
@ -138,7 +138,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
|||
int started = 0;
|
||||
|
||||
if ((ps = PyParser_New(g, start)) == NULL) {
|
||||
fprintf(stderr, "no mem for new parser\n");
|
||||
err_ret->error = E_NOMEM;
|
||||
PyTokenizer_Free(tok);
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue