[Python-checkins] r42728 - python/trunk/Python/pyarena.c
jeremy.hylton
python-checkins at python.org
Wed Mar 1 16:02:25 CET 2006
Author: jeremy.hylton
Date: Wed Mar 1 16:02:24 2006
New Revision: 42728
Modified:
python/trunk/Python/pyarena.c
Log:
Add missing DECREF.
Modified: python/trunk/Python/pyarena.c
==============================================================================
--- python/trunk/Python/pyarena.c (original)
+++ python/trunk/Python/pyarena.c Wed Mar 1 16:02:24 2006
@@ -159,5 +159,9 @@
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;
}
More information about the Python-checkins
mailing list