projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f2dac5
)
Add missing DECREF.
author
Jeremy Hylton
<jeremy@alum.mit.edu>
Wed, 1 Mar 2006 15:02:24 +0000
(15:02 +0000)
committer
Jeremy Hylton
<jeremy@alum.mit.edu>
Wed, 1 Mar 2006 15:02:24 +0000
(15:02 +0000)
Python/pyarena.c
patch
|
blob
|
history
diff --git
a/Python/pyarena.c
b/Python/pyarena.c
index 3a2e65ca592db3956d89909e3b1d697be411e280..1af8a87c8737cedd9f998291bee46fc72878e447 100644
(file)
--- 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;
}