* python/py-param.c (compute_enum_values): Decref 'item'.
This commit is contained in:
parent
0646da15da
commit
fcb49fc817
@ -1,3 +1,7 @@
|
|||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-param.c (compute_enum_values): Decref 'item'.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* mi/mi-main.c: Include python-internal.h.
|
* mi/mi-main.c: Include python-internal.h.
|
||||||
|
@ -611,12 +611,14 @@ compute_enum_values (parmpy_object *self, PyObject *enum_values)
|
|||||||
}
|
}
|
||||||
if (! gdbpy_is_string (item))
|
if (! gdbpy_is_string (item))
|
||||||
{
|
{
|
||||||
|
Py_DECREF (item);
|
||||||
do_cleanups (back_to);
|
do_cleanups (back_to);
|
||||||
PyErr_SetString (PyExc_RuntimeError,
|
PyErr_SetString (PyExc_RuntimeError,
|
||||||
_("The enumeration item not a string."));
|
_("The enumeration item not a string."));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
self->enumeration[i] = python_string_to_host_string (item);
|
self->enumeration[i] = python_string_to_host_string (item);
|
||||||
|
Py_DECREF (item);
|
||||||
if (self->enumeration[i] == NULL)
|
if (self->enumeration[i] == NULL)
|
||||||
{
|
{
|
||||||
do_cleanups (back_to);
|
do_cleanups (back_to);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user