mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
Guido pointed out that I was missing a couple decrefs.
This commit is contained in:
parent
594bc80c46
commit
70ffddf8af
@ -233,6 +233,7 @@ structseq_reduce(PyStructSequence* self)
|
||||
{
|
||||
PyObject* tup;
|
||||
PyObject* dict;
|
||||
PyObject* result;
|
||||
long n_fields, n_visible_fields;
|
||||
int i;
|
||||
|
||||
@ -259,7 +260,12 @@ structseq_reduce(PyStructSequence* self)
|
||||
self->ob_item[i]);
|
||||
}
|
||||
|
||||
return Py_BuildValue("(O(OO))", self->ob_type, tup, dict);
|
||||
result = Py_BuildValue("(O(OO))", self->ob_type, tup, dict);
|
||||
|
||||
Py_DECREF(tup);
|
||||
Py_DECREF(dict);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static PySequenceMethods structseq_as_sequence = {
|
||||
|
Loading…
Reference in New Issue
Block a user