File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2532,9 +2532,8 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var
25322532 break ;
25332533
25342534 // Struct member is allocated => check if it is also properly deallocated..
2535- else if (Token::Match (tok2->previous (), " [;{}] %varid% . %var% = malloc|strdup|kmalloc (" , variable->declarationId ())
2536- || Token::Match (tok2->previous (), " [;{}] %varid% . %var% = new" , variable->declarationId ())
2537- || Token::Match (tok2->previous (), " [;{}] %varid% . %var% = fopen (" , variable->declarationId ())) {
2535+ else if (Token::Match (tok2->previous (), " [;{}] %varid% . %var% = malloc|strdup|kmalloc|fopen (" , variable->declarationId ())
2536+ || Token::Match (tok2->previous (), " [;{}] %varid% . %var% = new" , variable->declarationId ())) {
25382537 const unsigned int structid (variable->declarationId ());
25392538 const unsigned int structmemberid (tok2->tokAt (2 )->varId ());
25402539
You can’t perform that action at this time.
0 commit comments