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

Method leakError

lib/checkleakautovar.cpp:110–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110void CheckLeakAutoVarImpl::leakError(const Token *tok, const std::string &varname, int type) const
111{
112 const CheckMemoryLeakImpl checkmemleak(mTokenizer, mSettings, mErrorLogger);
113 if (Library::isresource(type))
114 checkmemleak.resourceLeakError(tok, varname);
115 else
116 checkmemleak.memleakError(tok, varname);
117}
118
119void CheckLeakAutoVarImpl::mismatchError(const Token *deallocTok, const Token *allocTok, const std::string &varname) const
120{

Callers

nothing calls this directly

Calls 3

isresourceFunction · 0.85
resourceLeakErrorMethod · 0.80
memleakErrorMethod · 0.80

Tested by

no test coverage detected