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:
Victor Stinner 2013-07-11 23:17:33 +02:00
parent 71c8b7ec04
commit 526daabf34
1 changed files with 0 additions and 1 deletions

View File

@ -138,7 +138,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
int started = 0; int started = 0;
if ((ps = PyParser_New(g, start)) == NULL) { if ((ps = PyParser_New(g, start)) == NULL) {
fprintf(stderr, "no mem for new parser\n");
err_ret->error = E_NOMEM; err_ret->error = E_NOMEM;
PyTokenizer_Free(tok); PyTokenizer_Free(tok);
return NULL; return NULL;