diff --git a/checkmemoryleak.cpp b/checkmemoryleak.cpp index 7cb90c160..506484f22 100644 --- a/checkmemoryleak.cpp +++ b/checkmemoryleak.cpp @@ -573,7 +573,7 @@ TOKEN *CheckMemoryLeakClass::getcode(const TOKEN *tok, std::list { for ( const TOKEN *tok2 = tok->tokAt(5); tok2; tok2 = tok2->next() ) { - if ( TOKEN::Match(tok2, ";{") ) + if ( TOKEN::Match(tok2, "[;{]") ) break; else if ( tok2->str() == varname ) {