mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-111132: Fix crash on interactive_filename in run_mod
(#111136)
This commit is contained in:
parent
37e4e20eaa
commit
124259f9b3
2 changed files with 14 additions and 1 deletions
|
@ -1277,7 +1277,9 @@ run_mod(mod_ty mod, PyObject *filename, PyObject *globals, PyObject *locals,
|
|||
|
||||
PyCodeObject *co = _PyAST_Compile(mod, interactive_filename, flags, -1, arena);
|
||||
if (co == NULL) {
|
||||
Py_DECREF(interactive_filename);
|
||||
if (interactive_src) {
|
||||
Py_DECREF(interactive_filename);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue