From 09f4a9593e50d5d61d36c2e290df9f0a4c7bb615 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 9 Dec 2022 09:51:00 -0700 Subject: [PATCH] Fix a reference leak in the posix module. --- 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; }