aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 61d3a15..722c9b0 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -166,12 +166,7 @@ objfpy_get_progspace (PyObject *self, void *closure)
objfile_object *obj = (objfile_object *) self;
if (obj->objfile)
- {
- PyObject *pspace = pspace_to_pspace_object (obj->objfile->pspace);
-
- Py_XINCREF (pspace);
- return pspace;
- }
+ return pspace_to_pspace_object (obj->objfile->pspace).release ();
Py_RETURN_NONE;
}