CheckMemoryLeak.cpp: Minor improvements to avoid false positives
This commit is contained in:
parent
77389640cf
commit
15fe28272c
|
@ -156,11 +156,12 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
|
|||
isif = false;
|
||||
|
||||
// Allocated..
|
||||
if ( Match(tok, "%var1% =", varnames) )
|
||||
if ( Match(tok, "[(;{}] %var1% =", varnames) )
|
||||
{
|
||||
AllocType alloc = GetAllocationType( gettok(tok, 2) );
|
||||
AllocType alloc = GetAllocationType( gettok(tok, 3) );
|
||||
if ( alloc != No )
|
||||
{
|
||||
tok = tok->next;
|
||||
Alloc = alloc;
|
||||
alloc_indentlevel = indentlevel;
|
||||
|
||||
|
|
Loading…
Reference in New Issue