mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Add NetBSD/Solaris allocation functions.
* kmem_{z}alloc is used by Solaris and NetBSD
* pool_{cache_}get is used by NetBSD
This commit is contained in:
@@ -51,7 +51,11 @@ predicate allocationFunction(Function f) {
|
||||
name = "HeapReAlloc" or
|
||||
name = "VirtualAlloc" or
|
||||
name = "CoTaskMemAlloc" or
|
||||
name = "CoTaskMemRealloc"
|
||||
name = "CoTaskMemRealloc" or
|
||||
name = "kmem_alloc" or
|
||||
name = "kmem_zalloc" or
|
||||
name = "pool_get" or
|
||||
name = "pool_cache_get"
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -77,6 +81,12 @@ predicate freeFunction(Function f, int argNum) {
|
||||
name = "free" and argNum = 0
|
||||
or
|
||||
name = "realloc" and argNum = 0
|
||||
or
|
||||
name = "kmem_free" and argNum = 0
|
||||
or
|
||||
name = "pool_put" and argNum = 1
|
||||
or
|
||||
name = "pool_cache_put" and argNum = 1
|
||||
)
|
||||
or
|
||||
f.hasGlobalOrStdName(name) and
|
||||
|
||||
Reference in New Issue
Block a user