* 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 b388db2..fde010c 100644 (file)
@@ -1,5 +1,9 @@
 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)
        (gdbpy_selected_frame): Move object-construction code
        out of TRY_CATCH.
index 63629fe..337e307 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;
 }