mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
gh-94332: make it safe to call assemble_free when assemble_init has not been called (GH-94389)
This commit is contained in:
parent
21cbdae90f
commit
be82d26570
1 changed files with 2 additions and 1 deletions
|
@ -8554,6 +8554,8 @@ assemble(struct compiler *c, int addNone)
|
|||
{
|
||||
PyCodeObject *co = NULL;
|
||||
PyObject *consts = NULL;
|
||||
struct assembler a;
|
||||
memset(&a, 0, sizeof(struct assembler));
|
||||
|
||||
int code_flags = compute_code_flags(c);
|
||||
if (code_flags < 0) {
|
||||
|
@ -8683,7 +8685,6 @@ assemble(struct compiler *c, int addNone)
|
|||
|
||||
|
||||
/* Create assembler */
|
||||
struct assembler a;
|
||||
if (!assemble_init(&a, c->u->u_firstlineno))
|
||||
goto error;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue