diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:13:28 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-20 20:13:28 +0000 |
commit | 73748a82bb4a64335cc3388b34ef9c5486b69e65 (patch) | |
tree | fd351f6bc896e93ec469eee3dba07b2d037b736c /gdb/python | |
parent | d0a19b37c43775341c5412d90635353345b5f5c8 (diff) | |
download | gdb-73748a82bb4a64335cc3388b34ef9c5486b69e65.tar.gz |
* python/python.c (before_prompt_hook): Add cleanup to
decref 'hook'.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/python.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |