mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Update cpp/ql/src/experimental/Security/CWE/CWE-401/MemoryLeakOnFailedCallToRealloc.ql
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
import cpp
|
||||
import semmle.code.cpp.dataflow.DataFlow
|
||||
|
||||
/**
|
||||
* A call to `realloc` of the form `v = realloc(v, size)`, for some variable `v`.
|
||||
*/
|
||||
class ReallocCallLeak extends FunctionCall {
|
||||
ReallocCallLeak() {
|
||||
exists(AssignExpr ex, Variable v, VariableAccess va1, VariableAccess va2 |
|
||||
|
||||
Reference in New Issue
Block a user