diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 4252330db..2b58c307e 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -1087,7 +1087,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listnext()) + for (const Token *tok2 = tok->next(); tok2; tok2 = tok2->next()) { if (tok2->str() == "(") ++innerParlevel; @@ -1111,7 +1111,6 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list 0 && Token::Match(tok2, "! %varid%", varid)) { dep = true; - break; } if (innerParlevel > 0 && Token::Match(tok2, "%var% (") && !test_white_list(tok2->str())) { @@ -1132,6 +1131,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::list