From 69b4a17f342146d6b7a73975a37678db9916aa75 Mon Sep 17 00:00:00 2001
From: "Gao, Xiang" <qasdfgtyuiop@gmail.com>
Date: Thu, 28 Feb 2019 08:18:48 -0500
Subject: [PATCH 342/362] bpo-36126: Fix ref count leakage in structseq_repr.
 (GH-12035)

---
 Objects/structseq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Objects/structseq.c b/Objects/structseq.c
index 3e45840..aee9528 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -266,6 +266,7 @@ structseq_repr(PyStructSequence *obj)
 
         val = PyTuple_GetItem(tup, i);
         if (cname == NULL || val == NULL) {
+            Py_DECREF(tup);
             return NULL;
         }
         repr = PyObject_Repr(val);
-- 
1.8.3.1

