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
|
@ -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…
Reference in New Issue