Also decref PyErr_Fetch results.
Change-Id: I3e497d6750b08e24a9631c83a2b6e0e3c1502d79
Py_DECREF(message);
}
else {
- throwPythonException(env, "Internal error, no message");
+ PyTypeObject
+ *ty = (PyTypeObject *)exceptionType;
+ throwPythonException(
+ env, ty ? ty->tp_name
+ : "Internal error, null exception type");
}
Py_DECREF(args);
Py_DECREF(formatExc);
throwPythonException(env, "Internal error, no traceback module");
}
}
+ Py_XDECREF(exceptionType);
+ Py_XDECREF(exception);
+ Py_XDECREF(traceback);
}
PyEval_SaveThread();