mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-94332: make it safe to call assemble_free when assemble_init has not been called (GH-94389) (GH-94442)
(cherry picked from commit be82d26570
)
This commit is contained in:
parent
20b8c9eee0
commit
48a739ec10
1 changed files with 1 additions and 0 deletions
|
@ -8299,6 +8299,7 @@ assemble(struct compiler *c, int addNone)
|
||||||
int j, nblocks;
|
int j, nblocks;
|
||||||
PyCodeObject *co = NULL;
|
PyCodeObject *co = NULL;
|
||||||
PyObject *consts = NULL;
|
PyObject *consts = NULL;
|
||||||
|
memset(&a, 0, sizeof(struct assembler));
|
||||||
|
|
||||||
/* Make sure every block that falls off the end returns None. */
|
/* Make sure every block that falls off the end returns None. */
|
||||||
if (!c->u->u_curblock->b_return) {
|
if (!c->u->u_curblock->b_return) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue