aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index ca9e415..6516e1f 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -499,9 +499,12 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
{
xfree (cmd_name);
xfree (pfx_name);
+ Py_DECREF (ds_obj);
return -1;
}
}
+
+ Py_XDECREF (ds_obj);
}
if (! docstring)
docstring = xstrdup (_("This command is not documented."));