* python/py-prettyprint.c (search_pp_list): Decref 'attr'.
authorTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:39:31 +0000 (20:39 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:39:31 +0000 (20:39 +0000)
gdb/ChangeLog
gdb/python/py-prettyprint.c

index 99fc791..160aeac 100644 (file)
@@ -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.
 
index aa9476e..8c45cd6 100644 (file)
@@ -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;