DEV: coccinelle: Add realloc_leak.cocci
authorTim Duesterhus <tim@bastelstu.be>
Sat, 23 Oct 2021 17:53:35 +0000 (19:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Oct 2021 07:45:48 +0000 (09:45 +0200)
commite6c04507d8df96b15794a4c4dc782a376c0f3051
tree22902a8a71fbec40a5bec48ff19a7dacddc7d98e
parente0c1d749a8412b95d417d431e540ae31ceb8924d
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`.
dev/coccinelle/realloc_leak.cocci [new file with mode: 0644]