* python/python.c (before_prompt_hook): Add cleanup to

decref 'hook'.
This commit is contained in:
Tom Tromey 2013-05-20 20:13:28 +00:00
parent 764123e402
commit 0430e8cba9
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-05-20 Tom Tromey <tromey@redhat.com>
* python/python.c (before_prompt_hook): Add cleanup to
decref 'hook'.
2013-05-20 Tom Tromey <tromey@redhat.com>
* python/py-function.c (fnpy_init): Decref result of

View File

@ -900,6 +900,8 @@ before_prompt_hook (const char *current_gdb_prompt)
if (hook == NULL)
goto fail;
make_cleanup_py_decref (hook);
if (PyCallable_Check (hook))
{
PyObject *result;