diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index b2542fade..75f5256b6 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -1248,8 +1248,7 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listprevious(), ";|{|}|=|(|,|%cop% %varid% [", varid) || - Token::Match(tok->previous(), ";|{|}|=|(|,|%cop% %varid% .", varid)) { + } else if (Token::Match(tok->previous(), ";|{|}|=|(|,|%cop% %varid% .|[", varid)) { // warning is written for "dealloc ; use_ ;". // but this use doesn't affect the leak-checking addtoken(&rettail, tok, "use_");