diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 9aa5df0b6..92526167c 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -1492,7 +1492,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listprevious(), "[;{}=(,]") || tok->previous()->isOp()) && Token::Match(tok, "%varid% [", varid)) + else if (Token::Match(tok->previous(), ";|{|}|=|(|,|%op% %varid% [", varid)) { // warning is written for "dealloc ; use_ ;". // but this use doesn't affect the leak-checking