diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 99fc791cf0..160aeacce8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-20 Tom Tromey + + * python/py-prettyprint.c (search_pp_list): Decref 'attr'. + 2013-05-20 Tom Tromey * python/py-value.c (valpy_get_dynamic_type): Simplify diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index aa9476ed06..8c45cd6a6f 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;