C++: Add QLDoc to 'isExcludeFreePair'.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-04-13 10:15:23 +01:00
parent e0aeea058e
commit d304022685

View File

@@ -31,6 +31,14 @@ predicate isExFreePoolCall(FunctionCall fc) {
fc.getTarget().hasGlobalName("ExFreePool")
}
/**
* `dealloc1` is a deallocation expression and `e` is an expression such
* that is deallocated by a deallocation expression, and the `(dealloc1, e)` pair
* should be excluded by the `FlowFromFree` library.
*
* Note that `e` is not necessarily the expression deallocated by `dealloc1`. It will
* be bound to the second deallocation as identified by the `FlowFromFree` library.
*/
bindingset[dealloc1, e]
predicate isExcludeFreePair(DeallocationExpr dealloc1, Expr e) {
exists(DeallocationExpr dealloc2 | isFree(_, e, dealloc2) |