CheckMemoryLeak: Made the checking weaker to reduce false positives
This commit is contained in:
parent
7ae162792e
commit
9ce09909e6
|
@ -239,10 +239,10 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Linux lists.. todo: check if the first struct member is passed
|
// Linux lists.. todo: check if the first struct member is passed
|
||||||
if ( Match( tok, "%var% ( & %var1% .", varnames ) )
|
if ( Match( tok, "%var% ( & %var1% .", varnames ) ||
|
||||||
|
Match( tok, ", & %var1% .", varnames ) )
|
||||||
{
|
{
|
||||||
if ( strstr(tok->str, "list_add") )
|
return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// continue/break loop..
|
// continue/break loop..
|
||||||
|
@ -529,7 +529,9 @@ static void CheckMemoryLeak_ClassMembers_Variable( const std::vector<const char
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void CheckMemoryLeak()
|
void CheckMemoryLeak()
|
||||||
{
|
{
|
||||||
|
listallocfunc.clear();
|
||||||
|
|
||||||
// Check for memory leaks inside functions..
|
// Check for memory leaks inside functions..
|
||||||
CheckMemoryLeak_InFunction();
|
CheckMemoryLeak_InFunction();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue