]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93747: Fix Refleak when handling multiple Py_tp_doc slots (gh-93749)
authorDong-hee Na <donghee.na@python.org>
Sun, 12 Jun 2022 15:55:01 +0000 (00:55 +0900)
committerGitHub <noreply@github.com>
Sun, 12 Jun 2022 15:55:01 +0000 (00:55 +0900)
Objects/typeobject.c

index e57651446f888f0e275fe5cbf4eb8d43b803feb2..18094bd43dd3a1a46c45c8c3987a71581473f1e0 100644 (file)
@@ -3569,7 +3569,7 @@ PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module,
                 PyErr_SetString(
                     PyExc_SystemError,
                     "Multiple Py_tp_doc slots are not supported.");
-                return NULL;
+                goto finally;
             }
             if (slot->pfunc == NULL) {
                 type->tp_doc = NULL;