Fix several coverity issues:

* CID 350617: Dereference after null check
* CID 350585: Out-of-bounds read
* CID 350624: Resource leak
* CID 332701: Uncaught exception
* CID 350642: Uninitialized scalar field
* CID 350590: Uninitialized scalar field
* CID 350629: Uninitialized scalar variable
* CID 350602: Uninitialized scalar variable
* CID 350564: Uninitialized scalar variable
* CID 350548: Uninitialized scalar variable
This commit is contained in:
wmayer
2022-03-13 12:12:49 +01:00
parent afabaea5cb
commit 5fd93b7d3b
11 changed files with 85 additions and 58 deletions

View File

@@ -48,7 +48,12 @@ FeaturePythonImp::~FeaturePythonImp()
#undef FC_PY_ELEMENT
#define FC_PY_ELEMENT(_name) py_##_name = Py::None();
FC_PY_FEATURE_PYTHON
try {
FC_PY_FEATURE_PYTHON
}
catch (Py::Exception& e) {
e.clear();
}
}
void FeaturePythonImp::init(PyObject *pyobj) {