mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
Merge pull request #2533 from m00nbsd/master
Add NetBSD/Solaris allocation functions.
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