fix py-frame.c
A couple return paths in frapy_read_var were missing do_cleanups calls. * python/py-frame.c (frapy_read_var): Call do_cleanups along all return paths.
This commit is contained in:
parent
b862ce75d2
commit
af1c697129
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-30 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-frame.c (frapy_read_var): Call do_cleanups along
|
||||||
|
all return paths.
|
||||||
|
|
||||||
2013-05-30 Tom Tromey <tromey@redhat.com>
|
2013-05-30 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-breakpoint.c (bppy_get_commands): Call do_cleanups
|
* python/py-breakpoint.c (bppy_get_commands): Call do_cleanups
|
||||||
|
|
|
@ -461,6 +461,7 @@ frapy_read_var (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
PyErr_SetString (PyExc_RuntimeError,
|
PyErr_SetString (PyExc_RuntimeError,
|
||||||
_("Second argument must be block."));
|
_("Second argument must be block."));
|
||||||
|
do_cleanups (cleanup);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,7 +474,11 @@ frapy_read_var (PyObject *self, PyObject *args)
|
||||||
block = get_frame_block (frame, NULL);
|
block = get_frame_block (frame, NULL);
|
||||||
var = lookup_symbol (var_name, block, VAR_DOMAIN, NULL);
|
var = lookup_symbol (var_name, block, VAR_DOMAIN, NULL);
|
||||||
}
|
}
|
||||||
GDB_PY_HANDLE_EXCEPTION (except);
|
if (except.reason < 0)
|
||||||
|
{
|
||||||
|
do_cleanups (cleanup);
|
||||||
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
}
|
||||||
|
|
||||||
if (!var)
|
if (!var)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue