diff options
| author | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-03-01 15:02:24 +0000 |
|---|---|---|
| committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-03-01 15:02:24 +0000 |
| commit | 4c532920f495d0fc06c4ce7c7db8a362da2eddc8 (patch) | |
| tree | 1c422bdb1daeb0297270d46b885568dcbef891c9 /Python | |
| parent | d4f81ed6e6c2e7678b580dcfde56c863576e1c11 (diff) | |
| download | cpython-4c532920f495d0fc06c4ce7c7db8a362da2eddc8.tar.gz | |
Add missing DECREF.
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/pyarena.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/pyarena.c b/Python/pyarena.c index 3a2e65ca59..1af8a87c87 100644 --- a/Python/pyarena.c +++ b/Python/pyarena.c @@ -159,5 +159,9 @@ PyArena_Malloc(PyArena *arena, size_t size) int PyArena_AddPyObject(PyArena *arena, PyObject *obj) { - return PyList_Append(arena->a_objects, obj) >= 0; + int r = PyList_Append(arena->a_objects, obj); + if (r >= 0) { + Py_DECREF(obj); + } + return r; } |
