Fix coverity issue:

* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
This commit is contained in:
wmayer
2022-03-14 11:35:04 +01:00
parent 56eab3f08b
commit 0054cbddaa
51 changed files with 70 additions and 54 deletions

View File

@@ -315,7 +315,7 @@ Application::Application(std::map<std::string,std::string> &mConfig)
PyModule_AddObject(pAppModule, "Console", pConsoleModule);
// Translate module
PyObject* pTranslateModule = (new Base::Translate)->module().ptr();
PyObject* pTranslateModule = Base::Interpreter().addModule(new Base::Translate);
Py_INCREF(pTranslateModule);
PyModule_AddObject(pAppModule, "Qt", pTranslateModule);