From: Tom Tromey Date: Mon, 20 May 2013 20:37:48 +0000 (+0000) Subject: * python/py-type.c (typy_fields): Unconditionally decref 'r'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53e66479289df8761b06870304d67bdaf91f247d;p=binutils-gdb.git * python/py-type.c (typy_fields): Unconditionally decref 'r'. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b388db28f80..fde010c5fa3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-20 Tom Tromey + + * python/py-type.c (typy_fields): Unconditionally decref 'r'. + 2013-05-20 Tom Tromey * python/py-frame.c (frapy_older, frapy_newer, gdbpy_newest_frame) diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 63629fe2345..337e307386e 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; }