Skip to content

Commit d304022

Browse files
committed
C++: Add QLDoc to 'isExcludeFreePair'.
1 parent e0aeea0 commit d304022

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/ql/src/Critical/DoubleFree.ql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ predicate isExFreePoolCall(FunctionCall fc) {
3131
fc.getTarget().hasGlobalName("ExFreePool")
3232
}
3333

34+
/**
35+
* `dealloc1` is a deallocation expression and `e` is an expression such
36+
* that is deallocated by a deallocation expression, and the `(dealloc1, e)` pair
37+
* should be excluded by the `FlowFromFree` library.
38+
*
39+
* Note that `e` is not necessarily the expression deallocated by `dealloc1`. It will
40+
* be bound to the second deallocation as identified by the `FlowFromFree` library.
41+
*/
3442
bindingset[dealloc1, e]
3543
predicate isExcludeFreePair(DeallocationExpr dealloc1, Expr e) {
3644
exists(DeallocationExpr dealloc2 | isFree(_, e, dealloc2) |

0 commit comments

Comments
 (0)