diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-12-04 11:19:59 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-12-04 11:19:59 (GMT) |
commit | b96c6b0723b889d3a0c1740bce7f579f33d246f2 (patch) | |
tree | e14270505ae07e7af85639ba67571c7cfcd9b656 /Python | |
parent | 808769f3a4cbdc47cf1a5708dd61b1787bb192d4 (diff) | |
download | cpython-b96c6b0723b889d3a0c1740bce7f579f33d246f2.zip cpython-b96c6b0723b889d3a0c1740bce7f579f33d246f2.tar.gz cpython-b96c6b0723b889d3a0c1740bce7f579f33d246f2.tar.bz2 |
bpo-38962: Fix reference leak in new_interpreter() (GH-17453)
https://bugs.python.org/issue38962
Automerge-Triggered-By: @pablogsal
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index cce4783..9218978 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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"); } |