* python/python.c (gdbpy_run_events): Decref the result
of PyObject_CallObject.
This commit is contained in:
parent
33ee792fe5
commit
02146ba51f
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/python.c (gdbpy_run_events): Decref the result
|
||||||
|
of PyObject_CallObject.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-symtab.c (set_sal): Use
|
* python/py-symtab.c (set_sal): Use
|
||||||
|
|
|
@ -819,6 +819,8 @@ gdbpy_run_events (struct serial *scb, void *context)
|
||||||
|
|
||||||
while (gdbpy_event_list)
|
while (gdbpy_event_list)
|
||||||
{
|
{
|
||||||
|
PyObject *call_result;
|
||||||
|
|
||||||
/* Dispatching the event might push a new element onto the event
|
/* Dispatching the event might push a new element onto the event
|
||||||
loop, so we update here "atomically enough". */
|
loop, so we update here "atomically enough". */
|
||||||
struct gdbpy_event *item = gdbpy_event_list;
|
struct gdbpy_event *item = gdbpy_event_list;
|
||||||
|
@ -827,9 +829,11 @@ gdbpy_run_events (struct serial *scb, void *context)
|
||||||
gdbpy_event_list_end = &gdbpy_event_list;
|
gdbpy_event_list_end = &gdbpy_event_list;
|
||||||
|
|
||||||
/* Ignore errors. */
|
/* Ignore errors. */
|
||||||
if (PyObject_CallObject (item->event, NULL) == NULL)
|
call_result = PyObject_CallObject (item->event, NULL);
|
||||||
|
if (call_result == NULL)
|
||||||
PyErr_Clear ();
|
PyErr_Clear ();
|
||||||
|
|
||||||
|
Py_XDECREF (call_result);
|
||||||
Py_DECREF (item->event);
|
Py_DECREF (item->event);
|
||||||
xfree (item);
|
xfree (item);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue