Files
codeql/docs/language/ql-training-rst/query-examples/cpp/control-flow-cpp-1.ql
2019-08-22 14:58:27 +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