mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
- Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
This commit is contained in:
commit
a80b14cc5f
2 changed files with 6 additions and 1 deletions
|
@ -1251,8 +1251,10 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit,
|
|||
Py_DECREF(f);
|
||||
return -1;
|
||||
}
|
||||
if (PyDict_SetItemString(d, "__cached__", Py_None) < 0)
|
||||
if (PyDict_SetItemString(d, "__cached__", Py_None) < 0) {
|
||||
Py_DECREF(f);
|
||||
return -1;
|
||||
}
|
||||
set_file_name = 1;
|
||||
Py_DECREF(f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue