mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
796cc6e3ad
commit
cda139d1de
|
@ -0,0 +1 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue