bpo-36459: Fix a possible double PyMem_FREE() due to tokenizer.c's tok_nextc() (12601)
Remove the PyMem_FREE() call added incb90c89
. The buffer will be freed when PyTokenizer_Free() is called on the tokenizer state. (cherry picked from commitcda139d1de
) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
parent
bb89aa24cf
commit
dffe90ee0e
|
@ -0,0 +1 @@
|
|||
Fix a possible double ``PyMem_FREE()`` due to tokenizer.c's ``tok_nextc()``.
|
|
@ -979,7 +979,6 @@ tok_nextc(register 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;
|
||||
|
|
Loading…
Reference in New Issue