diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-03-28 13:53:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-03-28 13:53:00 (GMT) |
commit | cda139d1ded6708665b53e4ed32ccc1d2627e1da (patch) | |
tree | 97ffc90af733c2b54fba607d8d73b9e1d8417fd9 /Parser | |
parent | 796cc6e3ad3617c1ea9e528663aac1a206230a28 (diff) | |
download | cpython-cda139d1ded6708665b53e4ed32ccc1d2627e1da.zip cpython-cda139d1ded6708665b53e4ed32ccc1d2627e1da.tar.gz cpython-cda139d1ded6708665b53e4ed32ccc1d2627e1da.tar.bz2 |
bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)
Remove the PyMem_FREE() call added in cb90c89. The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/tokenizer.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index ad05497..58dd1cd 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -963,7 +963,6 @@ tok_nextc(struct tok_state *tok) newbuf = (char *)PyMem_REALLOC(newbuf, newsize); if (newbuf == NULL) { - PyMem_FREE(tok->buf); tok->done = E_NOMEM; tok->cur = tok->inp; return EOF; |