diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/python.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 443adaf..34a73f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 PyObject_GetAttrString. diff --git a/gdb/python/python.c b/gdb/python/python.c index 3e2a852..90581e5 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -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; |