This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 28/28] fix refcount bug in search_pp_list
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 19 Apr 2013 08:44:09 -0600
- Subject: [PATCH 28/28] fix refcount bug in search_pp_list
- References: <87ehe638ww dot fsf at fleche dot redhat dot com>
The checker noticed a missing decref in search_pp_list.
* python/py-prettyprint.c (search_pp_list): Decref 'attr'.
---
gdb/python/py-prettyprint.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index c337334..2d2af59 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -69,6 +69,7 @@ search_pp_list (PyObject *list, PyObject *value)
if (!attr)
return NULL;
cmp = PyObject_IsTrue (attr);
+ Py_DECREF (attr);
if (cmp == -1)
return NULL;
--
1.8.1.4