]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125017: Fix refleak from GH-125636 (GH-125664)
authorZachary Ware <zach@python.org>
Thu, 17 Oct 2024 22:21:32 +0000 (17:21 -0500)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2024 22:21:32 +0000 (17:21 -0500)
Objects/funcobject.c

index f86ef32f1827bf3023b6ddfdd2325c7114f5b567..3cb247691386bf3df0be73671ceccacd5dc0971c 100644 (file)
@@ -1264,6 +1264,7 @@ descriptor_set_wrapped_attribute(PyObject *oobj, PyObject *name, PyObject *value
                 PyErr_Format(PyExc_AttributeError,
                              "'%.200s' object has no attribute '%U'",
                              type_name, name);
+                Py_DECREF(dict);
                 return -1;
             }
             else {