diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-11-16 23:57:32 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-11-16 23:57:32 (GMT) |
commit | 143a97f64128070386b12a0ee589bdaad5e51f40 (patch) | |
tree | cd3b2cb71fc0cda153a31b0a090ba1be95b22939 | |
parent | c3f6bdc332d23588102eba749a5929dd5bb67c9d (diff) | |
download | cpython-143a97f64128070386b12a0ee589bdaad5e51f40.zip cpython-143a97f64128070386b12a0ee589bdaad5e51f40.tar.gz cpython-143a97f64128070386b12a0ee589bdaad5e51f40.tar.bz2 |
bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)
https://bugs.python.org/issue38823
-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; } |