From fdea456ad833fbab0d3a296a58250950f11a498c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 26 Jun 2017 20:33:56 +0000 Subject: Vendor import of lldb trunk r306325: https://llvm.org/svn/llvm-project/lldb/trunk@306325 --- scripts/Python/python-wrapper.swig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/Python/python-wrapper.swig') 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(baton), const_cast("s"), str); + PyObject *result = PyObject_CallFunction(reinterpret_cast(baton), const_cast("s"), str); + Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } } -- cgit v1.2.3