MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / functionCallLeak

Method functionCallLeak

lib/checkmemoryleak.cpp:1201–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201void CheckMemoryLeakNoVarImpl::functionCallLeak(const Token *loc, const std::string &alloc, const std::string &functionCall)
1202{
1203 reportError(loc, Severity::error, "leakNoVarFunctionCall", "Allocation with " + alloc + ", " + functionCall + " doesn't release it.", CWE772, Certainty::normal);
1204}
1205
1206void CheckMemoryLeakNoVarImpl::returnValueNotUsedError(const Token *tok, const std::string &alloc)
1207{

Callers 1

getErrorMessagesMethod · 0.80

Calls 1

reportErrorFunction · 0.70

Tested by

no test coverage detected