mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +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) {
|
if (interp->builtins_copy == NULL) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Py_DECREF(bimod);
|
||||||
return _PyStatus_OK();
|
return _PyStatus_OK();
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Py_XDECREF(bimod);
|
||||||
return _PyStatus_ERR("can't initialize builtins module");
|
return _PyStatus_ERR("can't initialize builtins module");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue