aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-inferior.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r--gdb/python/py-inferior.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 6db3df4..512d939 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -471,9 +471,7 @@ infpy_get_progspace (PyObject *self, void *closure)
program_space *pspace = inf->inferior->pspace;
gdb_assert (pspace != nullptr);
- PyObject *py_pspace = pspace_to_pspace_object (pspace);
- Py_XINCREF (py_pspace);
- return py_pspace;
+ return pspace_to_pspace_object (pspace).release ();
}
static int