aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-20 20:39:31 +0000
committerTom Tromey <tromey@redhat.com>2013-05-20 20:39:31 +0000
commit7d38e38f3f6d673175bf706c404bc353f461af98 (patch)
treeeae920b6cf2aec25714916de4e1fed3f8ac70b7e
parent97b77b3951bc72a15481a82fca2fd3ee9dd3d1d8 (diff)
downloadbinutils-7d38e38f3f6d673175bf706c404bc353f461af98.zip
binutils-7d38e38f3f6d673175bf706c404bc353f461af98.tar.gz
binutils-7d38e38f3f6d673175bf706c404bc353f461af98.tar.bz2
* python/py-prettyprint.c (search_pp_list): Decref 'attr'.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/python/py-prettyprint.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 99fc791..160aeac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2013-05-20 Tom Tromey <tromey@redhat.com>
+ * python/py-prettyprint.c (search_pp_list): Decref 'attr'.
+
+2013-05-20 Tom Tromey <tromey@redhat.com>
+
* python/py-value.c (valpy_get_dynamic_type): Simplify
dynamic_type assignment. Use Py_XINCREF.
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index aa9476e..8c45cd6 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;