[umbrello-devel] New Defects reported by Coverity Scan for Umbrello UML Modeller
scan-admin at coverity.com
scan-admin at coverity.com
Mon Jun 8 08:09:14 UTC 2015
Hi,
Please find the latest report on new defect(s) introduced to Umbrello UML Modeller found with Coverity Scan.
5 new defect(s) introduced to Umbrello UML Modeller found with Coverity Scan.
7 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)
** CID 95924: Resource leaks (RESOURCE_LEAK)
/home/umbrello/src/umbrello/umbrello/optionstate.cpp: 28 in _INTERNAL_15_optionstate_cpp_8ab98e70::Settings::[unnamed type]::operator ->()()
________________________________________________________________________________________________________
*** CID 95924: Resource leaks (RESOURCE_LEAK)
/home/umbrello/src/umbrello/umbrello/optionstate.cpp: 28 in _INTERNAL_15_optionstate_cpp_8ab98e70::Settings::[unnamed type]::operator ->()()
22 * which occurs due to creation of QFont objects before
23 * QApplication object is created.
24 */
25 #if QT_VERSION >= 0x050000
26 Q_GLOBAL_STATIC(OptionState, opState)
27 #else
>>> CID 95924: Resource leaks (RESOURCE_LEAK)
>>> Variable "x" going out of scope leaks the storage it points to.
28 K_GLOBAL_STATIC(OptionState, opState)
29 #endif
30 OptionState& optionState()
31 {
32 return *opState;
33 }
** CID 95923: Control flow issues (MISSING_BREAK)
/home/umbrello/src/umbrello/umbrello/listpopupmenu.cpp: 2077 in ListPopupMenu::setupMenu(ListPopupMenu::MenuType)()
________________________________________________________________________________________________________
*** CID 95923: Control flow issues (MISSING_BREAK)
/home/umbrello/src/umbrello/umbrello/listpopupmenu.cpp: 2077 in ListPopupMenu::setupMenu(ListPopupMenu::MenuType)()
2071 insert(mt_Model, i18n("Rename..."));
2072 break;
2073
2074 case mt_Properties:
2075 insert(mt_Expand_All);
2076 insert(mt_Collapse_All);
>>> CID 95923: Control flow issues (MISSING_BREAK)
>>> The above case falls through to this one.
2077 case mt_Properties_AutoLayout:
2078 case mt_Properties_Class:
2079 case mt_Properties_CodeImport:
2080 case mt_Properties_CodeGeneration:
2081 case mt_Properties_CodeViewer:
2082 case mt_Properties_Font:
** CID 95919: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2748 in Parser::parseForStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
________________________________________________________________________________________________________
*** CID 95919: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2748 in Parser::parseForStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
2742
2743 AST::Node expr;
2744 skipCommaExpression(expr);
2745 ADVANCE(')', ")");
2746
2747 StatementAST::Node body;
>>> CID 95919: Error handling issues (CHECKED_RETURN)
>>> Calling "parseStatement" without checking return value (as is done elsewhere 8 out of 10 times).
2748 parseStatement(body);
2749
2750 ForStatementAST::Node ast = CreateNode<ForStatementAST>();
2751 ast->setInitStatement(init);
2752 ast->setCondition(cond);
2753 // ast->setExpression(expression);
** CID 95918: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2740 in Parser::parseForStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
________________________________________________________________________________________________________
*** CID 95918: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2740 in Parser::parseForStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
2734 if (!parseForInitStatement(init)) {
2735 reportError(i18n("for initialization expected"));
2736 return false;
2737 }
2738
2739 ConditionAST::Node cond;
>>> CID 95918: Error handling issues (CHECKED_RETURN)
>>> Calling "parseCondition" without checking return value (as is done elsewhere 4 out of 5 times).
2740 parseCondition(cond);
2741 ADVANCE(';', ";");
2742
2743 AST::Node expr;
2744 skipCommaExpression(expr);
2745 ADVANCE(')', ")");
** CID 95917: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2776 in Parser::parseForEachStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
________________________________________________________________________________________________________
*** CID 95917: Error handling issues (CHECKED_RETURN)
/home/umbrello/src/umbrello/lib/cppparser/parser.cpp: 2776 in Parser::parseForEachStatement(std::unique_ptr<StatementAST, std::default_delete<StatementAST>> &)()
2770 AST::Node expr;
2771 // replace with the right parsing
2772 skipCommaExpression(expr);
2773 ADVANCE(')', ")");
2774
2775 StatementAST::Node body;
>>> CID 95917: Error handling issues (CHECKED_RETURN)
>>> Calling "parseStatement" without checking return value (as is done elsewhere 8 out of 10 times).
2776 parseStatement(body);
2777
2778 ForEachStatementAST::Node ast = CreateNode<ForEachStatementAST>();
2779 // add here the parser results
2780 ast->setStatement(body);
2781 UPDATE_POS(ast, start, lex->index());
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/3327?tab=overview
To manage Coverity Scan email notifications for "umbrello-devel at kde.org", click https://scan.coverity.com/subscriptions/edit?email=umbrello-devel%40kde.org&token=5fd61726dd9f6c9e1c4e067b821d8371 .
More information about the umbrello-devel
mailing list