Commit 526daabf authored by Victor Stinner's avatar Victor Stinner

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.
parent 71c8b7ec
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment