diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index d28f0cda110e..75b082ffe0c4 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -135,6 +135,7 @@ public: { if (!arg) return retval; + Py_INCREF(arg); // _SetItem steals a reference PyTuple_SetItem(pargs,idx,arg); idx++; }