* python/py-type.c (typy_fields): Unconditionally decref 'r'.
authorTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:37:48 +0000 (20:37 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:37:48 +0000 (20:37 +0000)
gdb/ChangeLog
gdb/python/py-type.c

index b388db28f80eb24c637bb2a224f516d7ba69675a..fde010c5fa3ec317a0882d11d51a1eb9a48eed45 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-20  Tom Tromey  <tromey@redhat.com>
+
+       * python/py-type.c (typy_fields): Unconditionally decref 'r'.
+
 2013-05-20  Tom Tromey  <tromey@redhat.com>
 
        * python/py-frame.c (frapy_older, frapy_newer, gdbpy_newest_frame)
index 63629fe2345ac5033c0b0dfc39d3629ff3b59bfe..337e307386e9e8c2e33d58e6749d3e7b4a379034 100644 (file)
@@ -379,10 +379,7 @@ typy_fields (PyObject *self, PyObject *args)
     return NULL;
   
   rl = Py_BuildValue ("[O]", r);
-  if (rl == NULL)
-    {
-      Py_DECREF (r);
-    }
+  Py_DECREF (r);
 
   return rl;
 }