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:
Tim Duesterhus 2021-10-23 19:53:35 +02:00 committed by Willy Tarreau
parent e0c1d749a8
commit e6c04507d8
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
@@
expression E;
expression F;
@@
* E = realloc(E, F);