Commit cda139d1 authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)

Remove the PyMem_FREE() call added in cb90c89d.  The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.
parent 796cc6e3
Fix a possible double ``PyMem_FREE()`` due to tokenizer.c's ``tok_nextc()``.
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment