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

Method publicAllocationError

lib/checkmemoryleak.cpp:686–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686void CheckMemoryLeakInClassImpl::publicAllocationError(const Token *tok, const std::string &varname)
687{
688 reportError(tok, Severity::warning, "publicAllocationError", "$symbol:" + varname + "\nPossible leak in public function. The pointer '$symbol' is not deallocated before it is allocated.", CWE398, Certainty::normal);
689}
690
691void CheckMemoryLeakInClass::runChecks(const Tokenizer &tokenizer, ErrorLogger& errorLogger)
692{

Callers 1

getErrorMessagesMethod · 0.80

Calls 1

reportErrorFunction · 0.70

Tested by

no test coverage detected