haproxy/dev/coccinelle/realloc_leak.cocci
Tim Duesterhus e6c04507d8 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`.
2021-10-28 09:45:48 +02:00

7 lines
56 B
Plaintext

@@
expression E;
expression F;
@@
* E = realloc(E, F);