Files
codeql/docs/language/ql-training/query-examples/cpp/control-flow-cpp-1.ql
2019-09-05 08:40:36 +01:00

9 lines
237 B
Plaintext

import cpp
from FunctionCall alloc, FunctionCall free, LocalScopeVariable v
where allocationCall(alloc)
and alloc = v.getAnAssignedValue()
and freeCall(free, v.getAnAccess())
and alloc.getASuccessor+() = free
select alloc, free