mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
bpo-38962: Fix reference leak in new_interpreter() (GH-17453)
https://bugs.python.org/issue38962 Automerge-Triggered-By: @pablogsal
This commit is contained in:
parent
808769f3a4
commit
b96c6b0723
1 changed files with 2 additions and 0 deletions
|
@ -648,9 +648,11 @@ pycore_init_builtins(PyThreadState *tstate)
|
|||
if (interp->builtins_copy == NULL) {
|
||||
goto error;
|
||||
}
|
||||
Py_DECREF(bimod);
|
||||
return _PyStatus_OK();
|
||||
|
||||
error:
|
||||
Py_XDECREF(bimod);
|
||||
return _PyStatus_ERR("can't initialize builtins module");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue