aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-20 20:30:24 +0000
committerTom Tromey <tromey@redhat.com>2013-05-20 20:30:24 +0000
commitfcb49fc817243a98937f14a9385b3de7d17417d6 (patch)
tree8d1f2ef0c0f239a528c4a0a39dd871b620bb5ab7 /gdb/python
parent0646da15da19313ef79611081904ce5e723b0646 (diff)
downloadgdb-fcb49fc817243a98937f14a9385b3de7d17417d6.zip
gdb-fcb49fc817243a98937f14a9385b3de7d17417d6.tar.gz
gdb-fcb49fc817243a98937f14a9385b3de7d17417d6.tar.bz2
* python/py-param.c (compute_enum_values): Decref 'item'.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-param.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c
index 2cc17b6..fbd9a77 100644
--- a/gdb/python/py-param.c
+++ b/gdb/python/py-param.c
@@ -611,12 +611,14 @@ compute_enum_values (parmpy_object *self, PyObject *enum_values)
}
if (! gdbpy_is_string (item))
{
+ Py_DECREF (item);
do_cleanups (back_to);
PyErr_SetString (PyExc_RuntimeError,
_("The enumeration item not a string."));
return 0;
}
self->enumeration[i] = python_string_to_host_string (item);
+ Py_DECREF (item);
if (self->enumeration[i] == NULL)
{
do_cleanups (back_to);