aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-20 20:37:48 +0000
committerTom Tromey <tromey@redhat.com>2013-05-20 20:37:48 +0000
commit53e66479289df8761b06870304d67bdaf91f247d (patch)
tree0a789db56e11de6ad4f8f6fa6bbdac3e18a3ad7e /gdb
parentdcf87832340eb5156dc68b34af3d233b0e672ae1 (diff)
downloadgdb-53e66479289df8761b06870304d67bdaf91f247d.zip
gdb-53e66479289df8761b06870304d67bdaf91f247d.tar.gz
gdb-53e66479289df8761b06870304d67bdaf91f247d.tar.bz2
* python/py-type.c (typy_fields): Unconditionally decref 'r'.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/python/py-type.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b388db2..fde010c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 63629fe..337e307 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -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;
}