diff options
author | Gao, Xiang <qasdfgtyuiop@gmail.com> | 2019-02-28 13:18:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-02-28 13:18:48 (GMT) |
commit | 69b4a17f342146d6b7a73975a37678db9916aa75 (patch) | |
tree | 008ef63613c9ce6561ee36a791e047c3d0656928 | |
parent | a588343390356f5f7bb40e25371f0f2a092d6d72 (diff) | |
download | cpython-69b4a17f342146d6b7a73975a37678db9916aa75.zip cpython-69b4a17f342146d6b7a73975a37678db9916aa75.tar.gz cpython-69b4a17f342146d6b7a73975a37678db9916aa75.tar.bz2 |
bpo-36126: Fix ref count leakage in structseq_repr. (GH-12035)
-rw-r--r-- | Objects/structseq.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |