diff options
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r-- | gdb/python/py-objfile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c index 2585f62..8ac93f9 100644 --- a/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c @@ -612,13 +612,11 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw) static void py_free_objfile (struct objfile *objfile, void *datum) { - struct cleanup *cleanup; objfile_object *object = (objfile_object *) datum; - cleanup = ensure_python_env (get_objfile_arch (objfile), current_language); + gdbpy_enter enter_py (get_objfile_arch (objfile), current_language); object->objfile = NULL; Py_DECREF ((PyObject *) object); - do_cleanups (cleanup); } /* Return a borrowed reference to the Python object of type Objfile |