Skip to content

Commit 69b4a17

Browse files
zasdfgbnmserhiy-storchaka
authored andcommitted
bpo-36126: Fix ref count leakage in structseq_repr. (GH-12035)
1 parent a588343 commit 69b4a17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/structseq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ structseq_repr(PyStructSequence *obj)
266266

267267
val = PyTuple_GetItem(tup, i);
268268
if (cname == NULL || val == NULL) {
269+
Py_DECREF(tup);
269270
return NULL;
270271
}
271272
repr = PyObject_Repr(val);

0 commit comments

Comments
 (0)