diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-11 20:52:19 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-11 20:52:19 (GMT) |
commit | 3bf5f530d91c8b55c10e10153d8224e72ed7b279 (patch) | |
tree | 574cb109e7ca7aa3d35b5770b2e54516454f37b5 /Parser | |
parent | 6b64a6803e17805a6a4fb9a82f7ec26bdc30a6d5 (diff) | |
download | cpython-3bf5f530d91c8b55c10e10153d8224e72ed7b279.zip cpython-3bf5f530d91c8b55c10e10153d8224e72ed7b279.tar.gz cpython-3bf5f530d91c8b55c10e10153d8224e72ed7b279.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')
-rw-r--r-- | Parser/parsetok.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7beb735..7abc612 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -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; } |