From 7a0f3c1d92ef0768e082ace19d970b0ef12e7346 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 10:18:29 -0700 Subject: [PATCH] gh-81057: Fix a Reference Leak in the posix Module (gh-100140) The leak was introduced in gh-100082. https://github.com/python/cpython/issues/81057 --- Modules/posixmodule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index f5175350e12aa6..4817973262f484 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; }