Skip to content

Commit

Permalink
fixed #12111 - memory leak with -j2 and --cppcheck-build-dir [ski…
Browse files Browse the repository at this point in the history
…p ci]
  • Loading branch information
firewave committed Dec 14, 2023
1 parent d427b7a commit 0a4b297
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cppcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,8 @@ void CppCheck::checkNormalTokens(const Tokenizer &tokenizer)
mAnalyzerInformation.setFileInfo("ctu", fi1->toString());
if (mSettings.useSingleJob())
mFileInfo.push_back(fi1);
else
delete fi1;
}

// cppcheck-suppress shadowFunction - TODO: fix this
Expand All @@ -1114,6 +1116,8 @@ void CppCheck::checkNormalTokens(const Tokenizer &tokenizer)
mAnalyzerInformation.setFileInfo(check->name(), fi->toString());
if (mSettings.useSingleJob())
mFileInfo.push_back(fi);
else
delete fi;
}
}
}
Expand Down

0 comments on commit 0a4b297

Please sign in to comment.