aboutsummaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-28 08:08:35 -0700
committerGitHub <noreply@github.com>2019-03-28 08:08:35 -0700
commit6fd3c852b15820480ad2ea83e7857615c4976304 (patch)
treea35354dbc7dd7ae0ac34ac439d10de3b0b060811 /Parser
parent[3.7] Fix NEWS entry with incorrect bpo number (GH-12600) (diff)
downloadcpython-6fd3c852b15820480ad2ea83e7857615c4976304.tar.gz
cpython-6fd3c852b15820480ad2ea83e7857615c4976304.tar.bz2
cpython-6fd3c852b15820480ad2ea83e7857615c4976304.zip
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. (cherry picked from commit cda139d1ded6708665b53e4ed32ccc1d2627e1da) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 34722f85b94..e374c5a4aee 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1055,7 +1055,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;