aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-10-19 20:11:37 +0000
committerTom Tromey <tromey@redhat.com>2010-10-19 20:11:37 +0000
commitcca56ac7aecdfc4ba5db742e6505e80d79e28931 (patch)
tree8cd41468d6d5619b71a0598d3eff31f114172c73 /gdb/python
parent5d1268c689fd5b9f05d217392a04dc8cf4ff881a (diff)
downloadgdb-cca56ac7aecdfc4ba5db742e6505e80d79e28931.zip
gdb-cca56ac7aecdfc4ba5db742e6505e80d79e28931.tar.gz
gdb-cca56ac7aecdfc4ba5db742e6505e80d79e28931.tar.bz2
* python/py-cmd.c (cmdpy_function): Unreference exception state.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-cmd.c7
1 files changed, 6 insertions, 1 deletions
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);