]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-81057: Fix a Reference Leak in the posix Module (gh-100140)
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 9 Dec 2022 17:18:29 +0000 (10:18 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Dec 2022 17:18:29 +0000 (10:18 -0700)
The leak was introduced in gh-100082.

https://github.com/python/cpython/issues/81057

Modules/posixmodule.c

index f5175350e12aa62775a843c0765f5c1044994931..4817973262f4848d004c509429edd3504f0ef296 100644 (file)
@@ -2242,6 +2242,7 @@ statresult_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
         return NULL;
     }
     _posixstate *state = get_posix_state(mod);
+    Py_DECREF(mod);
     if (state == NULL) {
         return NULL;
     }