summaryrefslogtreecommitdiff
path: root/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:56 +0000
commitfdea456ad833fbab0d3a296a58250950f11a498c (patch)
tree3db481072633e348326ee97c01d69518ed66b145 /scripts/Python/python-wrapper.swig
parent4befb1f96d641a958548654b2c3b674f0ce8404c (diff)
Notes
Diffstat (limited to 'scripts/Python/python-wrapper.swig')
-rw-r--r--scripts/Python/python-wrapper.swig3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Python/python-wrapper.swig b/scripts/Python/python-wrapper.swig
index a92102e328388..96b8dda80f827 100644
--- a/scripts/Python/python-wrapper.swig
+++ b/scripts/Python/python-wrapper.swig
@@ -929,7 +929,8 @@ void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton);
void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton) {
if (baton != Py_None) {
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
- PyObject_CallFunction(reinterpret_cast<PyObject*>(baton), const_cast<char*>("s"), str);
+ PyObject *result = PyObject_CallFunction(reinterpret_cast<PyObject*>(baton), const_cast<char*>("s"), str);
+ Py_XDECREF(result);
SWIG_PYTHON_THREAD_END_BLOCK;
}
}