diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-17 00:16:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-17 00:16:33 (GMT) |
commit | 1fe79a43400d092a074c6f9ae5eb290ea3e4f281 (patch) | |
tree | b9924268b4d90ac5bd027f3ba9e234a987195ff7 /Modules/_contextvarsmodule.c | |
parent | 48f4f75baeee8ade1fbfab1b0aa6a21a3b13a2f2 (diff) | |
download | cpython-1fe79a43400d092a074c6f9ae5eb290ea3e4f281.zip cpython-1fe79a43400d092a074c6f9ae5eb290ea3e4f281.tar.gz cpython-1fe79a43400d092a074c6f9ae5eb290ea3e4f281.tar.bz2 |
bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)
https://bugs.python.org/issue38823
(cherry picked from commit 143a97f64128070386b12a0ee589bdaad5e51f40)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Diffstat (limited to 'Modules/_contextvarsmodule.c')
-rw-r--r-- | Modules/_contextvarsmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_contextvarsmodule.c b/Modules/_contextvarsmodule.c index 71dd7fd..1abcdbf 100644 --- a/Modules/_contextvarsmodule.c +++ b/Modules/_contextvarsmodule.c @@ -52,6 +52,7 @@ PyInit__contextvars(void) (PyObject *)&PyContext_Type) < 0) { Py_DECREF(&PyContext_Type); + Py_DECREF(m); return NULL; } @@ -60,6 +61,7 @@ PyInit__contextvars(void) (PyObject *)&PyContextVar_Type) < 0) { Py_DECREF(&PyContextVar_Type); + Py_DECREF(m); return NULL; } @@ -68,6 +70,7 @@ PyInit__contextvars(void) (PyObject *)&PyContextToken_Type) < 0) { Py_DECREF(&PyContextToken_Type); + Py_DECREF(m); return NULL; } |