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/python | |
parent | f11632056dff3b2b0fee17d534afa5e4636c2a1e (diff) | |
download | fsf-binutils-gdb-8432bc4103216c10c1a2f18aaf445a61f6c4195e.zip fsf-binutils-gdb-8432bc4103216c10c1a2f18aaf445a61f6c4195e.tar.gz fsf-binutils-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/python')
-rw-r--r-- | gdb/python/py-param.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |