mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02: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
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 New Issue
Block a user