Skip to content

Commit

Permalink
Update checkleakautovar.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Apr 5, 2024
1 parent 8c8696f commit 6928713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkleakautovar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ void CheckLeakAutoVar::ret(const Token *tok, VarInfo &varInfo, const bool isEndO
tok2 = tok3;
else
continue;
if (Token::Match(tok2, "[});,+]") && !astIsBool(tok)) {
if (Token::Match(tok2, "[});,+]") && (!astIsBool(tok) || tok2->str() != ";")) {
used = PtrUsage::PTR;
break;
}
Expand Down

0 comments on commit 6928713

Please sign in to comment.