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

Method resourceLeakError

lib/checkmemoryleak.cpp:302–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302void CheckMemoryLeakImpl::resourceLeakError(const Token *tok, const std::string &varname) const
303{
304 std::string errmsg("Resource leak");
305 if (!varname.empty())
306 errmsg = "$symbol:" + varname + '\n' + errmsg + ": $symbol";
307 reportErr(tok, Severity::error, "resourceLeak", errmsg, CWE(775U));
308}
309
310void CheckMemoryLeakImpl::deallocuseError(const Token *tok, const std::string &varname) const
311{

Callers 2

getErrorMessagesMethod · 0.80
leakErrorMethod · 0.80

Calls 2

CWEClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected