This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 28/28] fix refcount bug in search_pp_list


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]