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

Method mismatchAllocDealloc

lib/checkmemoryleak.cpp:315–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void CheckMemoryLeakImpl::mismatchAllocDealloc(const std::list<const Token *> &callstack, const std::string &varname) const
316{
317 reportErr(callstack, Severity::error, "mismatchAllocDealloc", "$symbol:" + varname + "\nMismatching allocation and deallocation: $symbol", CWE(762U));
318}
319
320CheckMemoryLeakImpl::AllocType CheckMemoryLeakImpl::functionReturnType(const Function* func, std::list<const Function*> *callstack) const
321{

Callers 2

getErrorMessagesMethod · 0.45
mismatchErrorMethod · 0.45

Calls 1

CWEClass · 0.70

Tested by

no test coverage detected