mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-19 02:29:31 -05:00
DEV: coccinelle: Add realloc_leak.cocci
This coccinelle patch finds locations where the return value of `realloc()` is assigned to the pointer passed to `realloc()`. This calls will leak memory if `realloc()` returns `NULL`.
This commit is contained in:
parent
e0c1d749a8
commit
e6c04507d8
1 changed files with 6 additions and 0 deletions
6
dev/coccinelle/realloc_leak.cocci
Normal file
6
dev/coccinelle/realloc_leak.cocci
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@@
|
||||
expression E;
|
||||
expression F;
|
||||
@@
|
||||
|
||||
* E = realloc(E, F);
|
||||
Loading…
Reference in a new issue