diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-10-24 11:39:50 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-10-24 11:39:50 +0000 |
commit | 8432bc4103216c10c1a2f18aaf445a61f6c4195e (patch) | |
tree | 7747f55ab62325428d1deb5b4f30f974788b9377 /gdb | |
parent | f11632056dff3b2b0fee17d534afa5e4636c2a1e (diff) | |
download | gdb-8432bc4103216c10c1a2f18aaf445a61f6c4195e.zip gdb-8432bc4103216c10c1a2f18aaf445a61f6c4195e.tar.gz gdb-8432bc4103216c10c1a2f18aaf445a61f6c4195e.tar.bz2 |
2011-10-24 Phil Muldoon <pmuldoon@redhat.com>
PR python/13310
* python/py-param.c (call_doc_function): Correctly deference on
function exit.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/python/py-param.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6927bbd..cc266d4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c index d68d8fb..fe31cd1 100644 --- a/gdb/python/py-param.c +++ b/gdb/python/py-param.c @@ -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; } |