* python/py-finishbreakpoint.c (bpfinishpy_out_of_scope):
Decref the reslut of PyObject_CallMethod.
This commit is contained in:
parent
9f4ff0c296
commit
1886886089
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-finishbreakpoint.c (bpfinishpy_out_of_scope):
|
||||||
|
Decref the reslut of PyObject_CallMethod.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-event.c (gdbpy_initialize_event_generic): Return
|
* python/py-event.c (gdbpy_initialize_event_generic): Return
|
||||||
|
|
|
@ -326,8 +326,12 @@ bpfinishpy_out_of_scope (struct finish_breakpoint_object *bpfinish_obj)
|
||||||
if (bpfinish_obj->py_bp.bp->enable_state == bp_enabled
|
if (bpfinish_obj->py_bp.bp->enable_state == bp_enabled
|
||||||
&& PyObject_HasAttrString (py_obj, outofscope_func))
|
&& PyObject_HasAttrString (py_obj, outofscope_func))
|
||||||
{
|
{
|
||||||
if (!PyObject_CallMethod (py_obj, outofscope_func, NULL))
|
PyObject *meth_result;
|
||||||
|
|
||||||
|
meth_result = PyObject_CallMethod (py_obj, outofscope_func, NULL);
|
||||||
|
if (meth_result == NULL)
|
||||||
gdbpy_print_stack ();
|
gdbpy_print_stack ();
|
||||||
|
Py_XDECREF (meth_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_breakpoint (bpfinish_obj->py_bp.bp);
|
delete_breakpoint (bpfinish_obj->py_bp.bp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue