bpo-38962: Fix reference leak in new_interpreter() (GH-17453)

https://bugs.python.org/issue38962



Automerge-Triggered-By: @pablogsal
This commit is contained in:
Pablo Galindo 2019-12-04 11:19:59 +00:00 committed by Miss Islington (bot)
parent 808769f3a4
commit b96c6b0723
1 changed files with 2 additions and 0 deletions

View File

@ -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");
}