From d81914324432f9b25708da13dce362428efa6b06 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 20 May 2013 20:20:48 +0000 Subject: [PATCH] * python/py-cmd.c (cmdpy_init): Decref 'ds_obj'. --- gdb/ChangeLog | 4 ++++ gdb/python/py-cmd.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 949ae1953b6..64bac867141 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-20 Tom Tromey + + * python/py-cmd.c (cmdpy_init): Decref 'ds_obj'. + 2013-05-20 Tom Tromey * python/py-event.h (gdbpy_initialize_event_generic): Use diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index ca9e415c436..6516e1ff764 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.")); -- 2.30.2