mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
CPP: Autoformat 'Critical'.
This commit is contained in:
@@ -7,12 +7,11 @@
|
||||
* @id cpp/new-delete-array-mismatch
|
||||
* @tags reliability
|
||||
*/
|
||||
|
||||
import NewDelete
|
||||
|
||||
from Expr alloc, Expr free, Expr freed
|
||||
where
|
||||
allocReaches(freed, alloc, "new") and
|
||||
freeExprOrIndirect(free, freed, "delete[]")
|
||||
select
|
||||
free, "This memory may have been allocated with '$@', not 'new[]'.",
|
||||
alloc, "new"
|
||||
select free, "This memory may have been allocated with '$@', not 'new[]'.", alloc, "new"
|
||||
|
||||
Reference in New Issue
Block a user