Index: lldb/trunk/scripts/Python/python-wrapper.swig =================================================================== --- lldb/trunk/scripts/Python/python-wrapper.swig +++ lldb/trunk/scripts/Python/python-wrapper.swig @@ -929,7 +929,8 @@ 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; } }