Skip to content

Commit 3fadf2e

Browse files
committed
gh-94332: make it safe to call assemble_free when assemble_init has not been called (GH-94389)
(cherry picked from commit be82d26)
1 parent 226fdce commit 3fadf2e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/compile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7116,6 +7116,7 @@ assemble(struct compiler *c, int addNone)
71167116
int j, nblocks;
71177117
PyCodeObject *co = NULL;
71187118
PyObject *consts = NULL;
7119+
memset(&a, 0, sizeof(struct assembler));
71197120

71207121
/* Make sure every block that falls off the end returns None.
71217122
XXX NEXT_BLOCK() isn't quite right, because if the last

0 commit comments

Comments
 (0)