From cca56ac7aecdfc4ba5db742e6505e80d79e28931 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 19 Oct 2010 20:11:37 +0000 Subject: * python/py-cmd.c (cmdpy_function): Unreference exception state. --- gdb/ChangeLog | 4 ++++ gdb/python/py-cmd.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d41d970..d2b0c89 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-10-19 Tom Tromey + + * python/py-cmd.c (cmdpy_function): Unreference exception state. + 2010-10-19 Sami Wagiaalla * gdbtypes.h: Introduce BOOL_PTR_CONVERSION_BADNESS. diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 9f71290..e08b467 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -192,7 +192,12 @@ cmdpy_function (struct cmd_list_element *command, char *args, int from_tty) error (_("Error occurred in Python command.")); } else - error ("%s", msg); + { + Py_XDECREF (ptype); + Py_XDECREF (pvalue); + Py_XDECREF (ptraceback); + error ("%s", msg); + } } Py_DECREF (result); -- cgit v1.1