diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:30:23 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:30:23 +0000 |
commit | e0ede36274a194c07ed4407f4471849e3bda9db8 (patch) | |
tree | 3c28f3b955c07d341b44890e439a9f0f87e3a8ef /gdb/python | |
parent | 27ace36109505b3b255e60778b487decce10e92e (diff) | |
download | gdb-e0ede36274a194c07ed4407f4471849e3bda9db8.tar.gz |
* python/py-param.c (compute_enum_values): Decref 'item'.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-param.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c index 2cc17b6a71d..fbd9a7706f4 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); |