Skip to content

Commit

Permalink
* python/py-cmd.c (cmdpy_function): Unreference exception state.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Tromey committed Oct 19, 2010
1 parent 5d1268c commit cca56ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gdb/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2010-10-19 Tom Tromey <[email protected]>

* python/py-cmd.c (cmdpy_function): Unreference exception state.

2010-10-19 Sami Wagiaalla <[email protected]>

* gdbtypes.h: Introduce BOOL_PTR_CONVERSION_BADNESS.
Expand Down
7 changes: 6 additions & 1 deletion gdb/python/py-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cca56ac

Please sign in to comment.