Skip to content

Commit 60aeb2e

Browse files
committed
Fix
1 parent f8b92a1 commit 60aeb2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/checkleakautovar.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,9 @@ void CheckLeakAutoVar::ret(const Token *tok, VarInfo &varInfo, const bool isEndO
11791179
continue;
11801180

11811181
const Token* tok3 = tok2->next();
1182-
while (tok3 && tok3->isCast() && tok3->valueType() &&
1183-
(tok3->valueType()->pointer ||
1182+
while (tok3 && tok3->isCast() &&
1183+
(!tok3->valueType() ||
1184+
tok3->valueType()->pointer ||
11841185
(tok3->valueType()->typeSize(mSettings->platform) == 0) ||
11851186
(tok3->valueType()->typeSize(mSettings->platform) >= mSettings->platform.sizeof_pointer)))
11861187
tok3 = tok3->astOperand2() ? tok3->astOperand2() : tok3->astOperand1();

0 commit comments

Comments
 (0)