Skip to content

Commit

Permalink
pythongh-123229: Fix valgrind warning by initializing the f-string bu…
Browse files Browse the repository at this point in the history
…ffers to 0 in the tokenizer
  • Loading branch information
pablogsal committed Aug 23, 2024
1 parent 0b0f7be commit 6c09192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Parser/lexer/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c09192

Please sign in to comment.