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

Method memleakUponReallocFailureError

lib/checkmemoryleak.cpp:297–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297void CheckMemoryLeakImpl::memleakUponReallocFailureError(const Token *tok, const std::string &reallocfunction, const std::string &varname) const
298{
299 reportErr(tok, Severity::error, "memleakOnRealloc", "$symbol:" + varname + "\nCommon " + reallocfunction + " mistake: \'$symbol\' nulled but not freed upon failure", CWE(401U));
300}
301
302void CheckMemoryLeakImpl::resourceLeakError(const Token *tok, const std::string &varname) const
303{

Callers 1

getErrorMessagesMethod · 0.80

Calls 1

CWEClass · 0.70

Tested by

no test coverage detected