mirror of
https://github.com/python/cpython.git
synced 2026-06-27 19:36:07 +00:00
[3.14] gh-151112: Fix double free in assemble_init when out of memory (GH-151142) (#151206)
gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142)
(cherry picked from commit 580499177c)
Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
parent
ea7d943efd
commit
24cb16ee80
2 changed files with 4 additions and 3 deletions
|
|
@ -80,9 +80,9 @@ assemble_init(struct assembler *a, int firstlineno)
|
|||
}
|
||||
return SUCCESS;
|
||||
error:
|
||||
Py_XDECREF(a->a_bytecode);
|
||||
Py_XDECREF(a->a_linetable);
|
||||
Py_XDECREF(a->a_except_table);
|
||||
Py_CLEAR(a->a_bytecode);
|
||||
Py_CLEAR(a->a_linetable);
|
||||
Py_CLEAR(a->a_except_table);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue