mirror of
https://github.com/python/cpython.git
synced 2024-11-23 01:45:25 +08:00
gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (#123263)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
0b0f7befad
commit
adc5190014
@ -0,0 +1,2 @@
|
||||
Fix valgrind warning by initializing the f-string buffers to 0 in the
|
||||
tokenizer. Patch by Pablo Galindo
|
@ -12,7 +12,8 @@
|
||||
struct tok_state *
|
||||
_PyTokenizer_tok_new(void)
|
||||
{
|
||||
struct tok_state *tok = (struct tok_state *)PyMem_Malloc(
|
||||
struct tok_state *tok = (struct tok_state *)PyMem_Calloc(
|
||||
1,
|
||||
sizeof(struct tok_state));
|
||||
if (tok == NULL)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user