diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index f8e42a510..b136e65a1 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -965,7 +965,9 @@ Token *CheckMemoryLeakInFunction::getcode(const Token *tok, std::listnext()->link(); + tok = tok->next(); + if (tok->link()) + tok = tok->link(); } } }