2011-10-24 Phil Muldoon <pmuldoon@redhat.com>
authorPhil Muldoon <pmuldoon@redhat.com>
Mon, 24 Oct 2011 11:39:50 +0000 (11:39 +0000)
committerPhil Muldoon <pmuldoon@redhat.com>
Mon, 24 Oct 2011 11:39:50 +0000 (11:39 +0000)
        PR python/13310

* python/py-param.c (call_doc_function): Correctly deference on
function exit.

gdb/ChangeLog
gdb/python/py-param.c

index 6927bbdb1258afb00beeaea656c5b2ea6c059026..cc266d4d4071dadbcd6098ce965dad8606a39752 100644 (file)
@@ -1,3 +1,10 @@
+2011-10-24  Phil Muldoon  <pmuldoon@redhat.com>
+
+        PR python/13310
+
+       * python/py-param.c (call_doc_function): Correctly deference on
+       function exit.
+
 2011-10-21  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-tasks.c (print_ada_task_info): Fix computation of
index d68d8fb9fe8b4a2c3ecc9929570ee9d6f98f41f1..fe31cd17ff1325a259c34d4253c7dae6880fdde7 100644 (file)
@@ -331,6 +331,7 @@ call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
   if (gdbpy_is_string (result))
     {
       data = python_string_to_host_string (result);
+      Py_DECREF (result);
       if (! data)
        return NULL;
     }
@@ -338,6 +339,7 @@ call_doc_function (PyObject *obj, PyObject *method, PyObject *arg)
     {
       PyErr_SetString (PyExc_RuntimeError,
                       _("Parameter must return a string value."));
+      Py_DECREF (result);
       return NULL;
     }
 
This page took 0.032011 seconds and 4 git commands to generate.