diff --git a/lib/checkautovariables.cpp b/lib/checkautovariables.cpp index 2f655caa7..85545ee88 100644 --- a/lib/checkautovariables.cpp +++ b/lib/checkautovariables.cpp @@ -200,8 +200,7 @@ void CheckAutoVariables::autoVariables() tok = Token::findmatch(tok->next(), "%var%"); if (isAutoVarArray(tok)) errorInvalidDeallocation(tok); - } - else if (Token::Match(tok, "free ( & %var% ) ;") || Token::Match(tok, "delete [| ]| (| & %var% !![")) { + } else if (Token::Match(tok, "free ( & %var% ) ;") || Token::Match(tok, "delete [| ]| (| & %var% !![")) { tok = Token::findmatch(tok->next(), "%var%"); if (tok->variable()->isLocal()) errorInvalidDeallocation(tok);