]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* python/python.c (before_prompt_hook): Add cleanup to
authorTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:13:28 +0000 (20:13 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:13:28 +0000 (20:13 +0000)
decref 'hook'.

gdb/ChangeLog
gdb/python/python.c

index 443adafb9921a1fb2efc0ea587f9946211739e23..34a73f6e88e4d354e85af94226fc1de70e1d0d18 100644 (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
index 3e2a852432c808560a9467cd2e3e2e869d3d804a..90581e5fec925339cad6335f3442455d037e0924 100644 (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;