summaryrefslogtreecommitdiffstats
path: root/Parser/parsetok.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-07-11 21:17:33 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-07-11 21:17:33 (GMT)
commit526daabf341a2e0e5c2624ebcf82968bd48b5019 (patch)
tree9e97049d0d00174140eba9e1c2dd1abc115cd132 /Parser/parsetok.c
parent71c8b7ec0464628633954333038af2f8174c10be (diff)
downloadcpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.zip
cpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.tar.gz
cpython-526daabf341a2e0e5c2624ebcf82968bd48b5019.tar.bz2
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.
Diffstat (limited to 'Parser/parsetok.c')
-rw-r--r--Parser/parsetok.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 7abc612..d61ba92 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -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;