From 0430e8cba970e103a67e6066b7475f1fd8bae184 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 20 May 2013 20:13:28 +0000 Subject: [PATCH] * python/python.c (before_prompt_hook): Add cleanup to decref 'hook'. --- gdb/ChangeLog | 5 +++++ gdb/python/python.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 443adafb992..34a73f6e88e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-20 Tom Tromey + + * python/python.c (before_prompt_hook): Add cleanup to + decref 'hook'. + 2013-05-20 Tom Tromey * python/py-function.c (fnpy_init): Decref result of diff --git a/gdb/python/python.c b/gdb/python/python.c index 3e2a852432c..90581e5fec9 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; -- 2.30.2