]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115498: Fix `SET_COUNT` error handling in `_xxinterpchannelsmodule` (#115499)
authorNikita Sobolev <mail@sobolevn.me>
Thu, 15 Feb 2024 21:31:23 +0000 (00:31 +0300)
committerGitHub <noreply@github.com>
Thu, 15 Feb 2024 21:31:23 +0000 (00:31 +0300)
Modules/_xxinterpchannelsmodule.c

index a2974aced12ca06e0a89998d0f3adea7c4d33877..82d2ae7fc4c9634b548e0452983070e3a646b539 100644 (file)
@@ -2158,7 +2158,7 @@ new_channel_info(PyObject *mod, struct channel_info *info)
     do { \
         PyObject *obj = PyLong_FromLongLong(val); \
         if (obj == NULL) { \
-            Py_CLEAR(info); \
+            Py_CLEAR(self); \
             return NULL; \
         } \
         PyStructSequence_SET_ITEM(self, pos++, obj); \