summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-12-04 11:19:59 +0000
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-04 03:19:59 -0800
commitb96c6b0723b889d3a0c1740bce7f579f33d246f2 (patch)
treee14270505ae07e7af85639ba67571c7cfcd9b656 /Python
parent808769f3a4cbdc47cf1a5708dd61b1787bb192d4 (diff)
downloadcpython-git-b96c6b0723b889d3a0c1740bce7f579f33d246f2.tar.gz
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index cce4783bc1..9218978cc6 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");
}